For details of other assignments and general rules, see this page.For the due date see the course syllabus
This is an individual assignment. You must work strictly alone on this.
Hand in answers to the following. Note that some of the material comes from chapter 2 and some from the very start of chapter 5. It is suggested that you do the questions from chapter 2 first, then work on the problem from chapter 5 as the deadline nears
It is suggested that you use Umple for the inheritance hierarchies and class diagram.
From the 2DShape Hierarchy on slide 22 of the Chapter 2 notes:
a) If you have a variable of type Polygon and you call the method getVertices, in what class or classes are the methods that might be invoked?
b) If you have a variable of type EllipticalShape and there is a Circle object in it, and you call the method translate, in what class or classes are the methods that might be invoked?
Add the following classes to the 2DShape class diagram. For each, indicate its superclass, attributes and methods.
If you would need to insert another class or change an existing class, then specify this.
Create a simple class diagram for the following classes. Add superclasses as necessary, and feel free to change the names of the following classes. Add necessary attributes.
a) Part of a system for managing musical instruments. This one will mostly be a pure class hierarchy.
Classes include: Drum, Violin, Piano, Organ, Trumpet, Trombone, Cello, Electric Guitar, Acoustic Guitar; attributes include isElectronic, highestNote, lowestNote, typicalWeight. Think of some other attributes that would distinguish the classes.
b) A system for tracking recipes. This one will ask you to add some basic associations.