...
When doing laundry, Acker removes fifteen (or fewer, if the pile isn't that large) items from the top of the dirty clothes pile. In the simulation, a load of clothes is laundered and dried instanteously instantaneously and placed on a table for clean clothes reserved for Acker in the laundry room. Acker changes clothes so infrequently that the washing and drying time is negligible, so our simulation is a good approximation. The garments in each load of clean clothes are piled in exactly the same order they appeared in the dirty pile. Acker fills the washer and dryer so full that the clothing doesn't get jumbled up.
...
The course staff is providing a framework for writing this program that includes many classes and interfaces. The framework is packaged as a zipped DrJava project file laundry.zip. This file will unzip into a
self-contained file tree with root directory laundry
. This directory contains the source tree for the laundry
framework with root directory edu
, a DrJava project profile laundry.drjava
and two text files sampleIn} and {{sampleOut
used by the sample laundry test class edu.rice.comp211.laundry.tests.LaundryTest
. Given the text input in sampleIn}, your program should generate the text in {{sampleOut
. The provided framework compiles but LaundryTest
will fail because most of the members in two key classes DoCommandVisitor
and Student
have been stubbed out.
After unzipping the laundry.zip
file, you can open the DrJava laundry project
by starting DrJava, 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 laundry.zip
. You can save the project state at any point during a DrJava session using the Save
command in the Project
menu.
Your assignment is to fill in the stubbed out members of the DoCommandVisitor
and Student
(members with degenerate bodies (either return;
or return null;
). In the process you may choose to define some new classes to support your Student
class implementation. The Student
class 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.
...