Preview

10 - Composition

 1. Composition aggregation is where an object that is created can be composed of other objects - if the original object is deleted, the composed objects will continue to exist.
The following video provides an explanation of composition using Java

  FALSE

  TRUE

 2. Composition is a strong type of aggregation and is sometimes referred to as a "death" relationship.

  TRUE

  FALSE

 3. Read the following example and decide whether it is a rough analogy to Composition in OOP.
A house is composed of one or more rooms. 
If the house is destroyed, all the rooms that
 are part of the house are also destroyed as they 
cannot exist by themselves

  FALSE

  TRUE

 4. In essence, Composition is also a whole/part relationship but unlike aggregation, here the lifetime of the "part" is controlled by the ________

  "object"

  "part"

  "class"

  "whole"

 5. Composition is represented in UML using a line connecting the objects with a solid diamond at the end of the object that owns the other object.

  TRUE

  FALSE