Composition In Class Diagram with Examples

Composition In Class Diagram with Examples.

Examples of Composition

  1. Every motorcycle has tires
  2. Every university has different departments.
  3. Every house has rooms.
  4.  A car has a battery.
  5. The sports club has Cricket playgrounds.
  6. The school has a canteen.
  7. Human has heart.

When we can use composition?

we can use composition in cases where one object “has” (or is part of) another object.

Add a Comment