final version of homework 4. Added javadoc to the jUnit tests.