Versions Compared

Key

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

...

You WILL need to make anonymous inner classes and possible 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!

Student Package

A student is wearing a shirt, pants and socks.   The student also has references to several lists (ordered piles) of garments:  clean shirts, clean pants, clean socks, a dirty clothes pile and a laundry room which is a list of list of garments because it represents the collection of multiple loads of laundered garments that have been cleaned, but not yet folded and returned to the individual clean garment piles.

...