Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  •  Most of the supplied code is support code that you do not have to worry about.   You are certainly free to use whatever you wish, but only the classes listed here should be needed.    
  • You WILL need to make anonymous inner classes and
    possible
    possibly some named classes if you feel you need them.   The staff's solution only uses anonymous inner classes, so it definitely can be done that way.
  •  In viewing the UML diagrams below, keep in mind that a class or interface always inherits all of the methods of its parents, i.e. everything above it.   Just because a class or interface only shows 2 methods in its little box in the UML diagram doesn't mean that's all the methods it has--look at all the methods in its superclasses/superinterfaces too!
  • Don't forget to import a package before attempting to use any of its classes.
  • Check the Javadoc comments of each class to learn more about what each class does.

...

Garments support a visitor, GarmentVisitor, which has cases for each type of visitor.   NEVER test for the type of a Garment object!   Always delegate to it by having the garment object accept a visitor whose different cases provide the garment-type-dependent processing you desire.

...

DoCommandVisitor is the visitor that you have to write (fill in the missing code) for this assignment.   Other than the student field, your implementation may have additonal fields and private utility methods that you decide you need for your implementation.  Thus, your DoComandVistor may appear slightly different than what is shown here.    

...