The assignment is also designed to help you create and test your code incrementally. It will also teach you to work with multiple classes, only one of which you actually write.
The assignment consists of three java classes.
Here is the documentation for the classes. Study the documentation for details on how to complete your implementation.
.javafiles to your project. The easiest way to do this is to right click on the link, then use
Save Target as ...to copy the file into your project. Then use the IDE's capabilities to create initial implementations of all the methods you need to write. You now have a completely functional program. However, it will not give the correct results.
The code in
AssignX.java has been designed to make it easy
for you to write one method at a time and then test it before moving on.
Because of the Shell, you need only complete the code you want to test.
For example, you might first implement
divides(). Then run
MyAssign1. When the program starts type
div 15 3 and
verify you get the correct result. You may type as many commands as you want.
When you are done, type
exit. Use the
to see all your options.
As a suggestion, you might implement the methods in the following order
MyAssignX.javausing the Checkin tab of the course website or at a terminal type:
~csXXX/bin/checkin XXX MyAssignX.java