Java Reference
In-Depth Information
Q Should I include unit tests in my submission?
A Current assignments have a warning stating that you will not get extra credit for going
beyond the specifications. That being the case, we recommend that you do not include
the test cases in your submission: at best the assessor will ignore them, and at worst
you may receive a lower score if the assessor finds a fault with additional code. Plus if
you use JUnit, your test code won't compile without junit.jar —and that's external
code you're not allowed to include for the assignment.
Q Should I leave logging code in my submission?
A As mentioned in the section on logging, we recommend that you leave the logging in
your code—this saves you the effort of trying to remove it, and more importantly, saves
you the effort of trying to re-add it if you later need it again. (Yes, we know this seems
to contradict the answer about unit tests, but unit tests are separate from your major
project code, and logging is integrated into your project code. Also, java.util.logging
is part of the standard libraries, whereas JUnit is not. So that's another reason why it's
okay to include logging code in your assignment, but not JUnit code.)
Q Can a custom directory structure be used instead of the one presented in the topic?
A For your Sun assignment, check the instructions carefully—if they specify a directory
structure, then you must follow it. Outside of any Sun restrictions, any directory struc-
ture may be used. If you intend to follow along with the sample project in this topic but
decide to change the directory structure, then the instructions and examples in the
topic may need alterations in order to run as explained. You should only use custom
directory structures if you are already comfortable with Javadoc, classpaths, and pack-
age structures.
Search WWH ::




Custom Search