Machine-translated by Google. Questions are authored in English.
Top

Discussion

During Object-Oriented Analysis, which relationship type implies that the'child' object cannot exist independently of the 'parent' object ?

  • A.Generalization
  • B.Composition
  • C.Aggregation
  • D.Realization

Answer: B

The relationship is Composition.

Composition is a strong whole-part relationship in which the part's lifetime depends on the whole: if the whole is destroyed, so are its parts. A room cannot exist without its building. In UML it is drawn with a filled diamond.

Aggregation is a weaker whole-part relationship in which parts can exist independently (a department and its employees), shown with a hollow diamond. Generalization is inheritance, and realization links an interface to the class that implements it.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.