Composition

  • Special Case of Aggregation.
  • When one class is highly dependent on the other. For example, Library and books.
  • Strong Existence Relation — Composition means that the contained object cannot exist without the aggregation (for example, a car reservation cannot exist without the car rental agency).
  • Lifetime of individual parts = Lifetime of aggregate
  • What kind of relationship?
    • PART - OF
    • Existence-dependent whole-part relationship

Children
  1. Benefits of Composition
  2. Disadvantages of Composition