Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Homework 10: SimLaundry 2010

Due Wednesday, 13 April 2010 at 11:00 A.M.


This assignment has a long description but the coding involved is straightforward. Most of the code for the full application has been written as support code by the course staff. In our solution, the remaining code that you must write (excluding test code) consists of approximately 250 lines (including comments and whitespace lines).


After unzipping the file, you can open the DrJava laundry project by starting DrJava, setting the Language Level to Full Java, pulling down the Project menu and selecting the Open command. In the file chooser that pops up, select the project profile file laundry.drjava embedded in the file in the unzipped file tree for You can save the project state at any point during a DrJava session using the Save command in the Project menu. You can also save individual files within the project using the Save button on command file or the File menu.

Your assignment is to fill in the stubbed out members of the DoCommandVisitor   All required areas in the code are clearly marked with comments for the student to complete the code in that area.  In the process you may choose to define some new classes to support your DoCommandVisitor class implementation. The Student class which repeatedly invokes DoCommandVisitor models the laundry habits of Acker. In our test simulations, we will typically only create a single instance of Student representing Acker, but your code should support multiple students (e.g., Acker and his brothers) at a time. Since these students do not interact with each other, supporting this form of multiplicity is a trivial consequence of OO coding style used in the framework.


Important Note:   When the simulation begins, Acker is wearing white pants, white socks, and a white shirt. The closet shelf, dirty laundry pile, and laundry facilities are all initially empty.

Assume that the supplied test files are NOT exhaustive!!   You are responsible for the complete testing of your code!

Development Process Recommendation