Saturday, May 7, 2011

OOD;3

OOD;3 Answers
1. 







*BendFromForce should have (Boolean)




2.













3. Composition: The Object is said to be COMPOSED of other objects (It "has-a" class,Eg, a TABLE has-a "CHAIR" and "FORK".).

4. Inheritance: An Object is said to be a PARENT (SuperClass) with multiple CHILD classes (SubClasses). A CHILD class is always in an "is-a" relationship with the PARENT. ie, VAN is-a CHILD of the CAR PARENT Class.

5. Multiplicity: Affects Composition. A TABLE class could have Multiplicity in the sense that it can have, for example, 4x CHAIR classes, and 8x CUTLERY classes.

No comments:

Post a Comment