600.226 Data Structures -- Spring 2013
Homework #3 -- 20 Points Total
Due 2:30pm on Wednesday, 2/13
Part A) Read and Review
It's time to review your Java (if you haven't already), and learn
about some tools we will be using for our implementations this semester.
- Review your favorite Java textbook and/or the examples on the
intro Java course website: www.cs.jhu.edu/~joanne/cs107/code
- Read about Checkstyle and what various errors may mean:
Checkstyle website
- If you'd like to get better using Unix and an editor, read the
documents posted at the bottom of the tools section of
our main course webpage.
- Install the checkstyle plug-in
for Eclipse on your laptop.
You can try to configure this yourself, but we will do it together
in class on Wednesday.
- Read about JUnit for unit testing in java:
JUnit
tutorial, JUnit downloads
and basics (revised link)
Part B) Clean Java Code [20 points]
If you haven't already, download
the timeSomething.java
class from the notes directory. The purpose of this assignment is
to clean it up!
- [4] Add a comment at the beginning with your name, blackboard login,
and an explanation of what this program actually does.
- [10] Eliminate all the checkstyle errors from this file, based on our
jhu_checks.xml configuration file (similar to what we did in class
on Friday with SearcherBetter.java).
- [4] Continue editing the file to eliminate as many code redundancies
and inefficiencies as possible.
- [2] Throw appropriate exceptions when input errors occur instead of
printing error messages and exiting the program.
- Make sure your new version still
compiles, runs properly, and complies with checkstyle (no errors).
- Submit your final version source code on Blackboard as hw3 and also
bring a hardcopy printout of your solution to class. Remember, you
may submit multiple times before the deadline. We will only grade
your last (most recent) submission unless you ask otherwise.