Finishing HW5

PositionalGraphic Class Design

Basic-Shape Child Class Design

Complex-Shape Child Class Design

Make sure you are ready to discuss the complex classes during lecture:

  1. What additional instance variables do these classes have?

  2. What additional methods do these classes have?

  3. These classes demonstrate composition because they both are PositionalGraphic objects and have PositionalGraphic objects (isa and hasa).

    How does this affect your child-class design?

    How does this affect the methods that need to be overidden, such as paint(), toString(), setShapeSize(), setBoundingRectangle, setShapeLocation(), setCenter(), ...?

Final Application

Note: No one has asked about the prompting for the IceCreamConePG class test program - might be a good idea for you to discuss on Piazza ... This will help you with your class design too, and I have give you permission to discuss it, but remember no posting code!