You are responsible for testing your code before submitting it. If you do a poor job of this, you should not be surprised if my tests find bugs that you were unaware of.
With that said, my tests are seldom particularly subtle or difficult. Most of them follow the basic forms of black-box testing with which you should already be familiar. In some cases, you may need to write your own test drivers or other scaffolding.
How can you tell if your output is correct? In most assignments, I will supply you with a compiled version of my own solution. You can run your program and mine on the same input and compare the outputs in head-to-head testing. Consequently, there should be very little question as to what output is expected for any given test input.
You will find these compiled versions of my solution in the bin directory of the assignment. These will be supplied as a .jar file.
To run the sample solution, use the -jar
option of the java command:
java -jar ~zeil/cs382/Assignments/assignmentName
/bin/jarFileName
.jar any-command-arguments-required
And remember, when typing long path names in Linux shells, the Tab key can be used to auto-complete a file or directory name after you give the first few letters.
In the Forum: