Algorithms and OOD (CSC 207 2013F) : Labs
Summary: In this laboratory, you will have the chance to improve your skills regarding code documentation and testing.
Make sure you’ve read the related reading. It might be useful to refer to it by opening it up in a separate tab.
Now it’s time for you to write some comments and generate Javadocs. In the previous lab you had to fix some broken code. Hopefully you’re done fixing it by now and you know how everything works. Your task for today is to thoroughly document every method and generate the Javadoc HTML. Attach those HTML files to the project and push it to your repository.
* Hint: When you generate Javadoc, the HTML files will automatically be added to your project under the doc (documentation) folder.
Create a JUnit Test Case for your FixedCode class, by right clicking it going to New > JUnit Test Case. Remember that Eclipse will automatically name the class for you so all you have to do is hit next so that you can move onto the Test Methods screen. When you choose the methods you want to test select
For each test method you must use at least two of the tests provided in the reading, however you must:
assertEqualstest for the methods
After you have written your test cases hit run and check to see if all of your methods pass.
If any methods fail, make note of which ones and rewrite the test so that they pass.
* Hint: This may include utilizing tests like
Copyright (c) 2013 Samuel A. Rebelsky.
This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.