...
Assume that the supplied test files are NOT exhaustive!! You are responsible for the complete testing of your code!
Development Process Recommendation
It is highly recommended that you take a step-by-step, highly structured approach to this assignment. Take SMALL steps, testing thoroughly before moving to the next step.
Write and test the easiest cases of DoCommandVisitor
first and then move on to the harder cases. In the opinion of the staff, the case in order from easiest to hardest are approximately (there is definitely room for argument here!)
forOutfit
forReceive
forFold
forLaunder
forLose
forChange
Grading
Your solution will be graded using the textual interface. Graphical interfaces are notoriously difficult to test and all of the graphical interface code is part of our support code anyway. Your correctness and testing scores (which each count 25% of your grade) will be based on how well your implementation of each command complies with the given specifications and on how well you demonstrate this compliance with test cases. You can test your DoCommandVisitor using the same approach given in our LaundryTest.java
class. These tests use the simulate
method in Student
to drive the execution of DoCommandVisitor
. If you write some utility methods fopr BiLists
you should separately test these methods. You are NOT responsible for testing any of our support code in HW10.zip
including the BiList
class.
...
Use imperative programming sparingly -- only if and when you absolutely need it!
You are not at all required to do this, but as a benchmark, it should be noted that the staff solution implements each case of DoCommandVisitor
as a single return
statement. This should tell you something about the power of delegation in this assignment.
Form of Event Commands
Your program executes a loop that repeatedly reads input from an input "process" that returns Command
objects. The input process (provided by our supporting framework) reads a series of event description commands, one to a line, either from the console or from a file. The input process converts a stream of characters to Command
objects which are passed to your program.
...