Creating composition associations

Another way of drawing a composite class is to use a composition association. A composition association is a strong aggregation relation connecting a composite class to a part class (component).

About this task

The notation is a solid diamond at the composite end of the relationship, as shown in this example.

Composition association - notation is a solid diamond at the composite end of the relationship

The composite class has the sole responsibility of memory management for its part classes. As a result, a part class can be included in only one composite class at a time. A composition can contain both classes and associations.

Procedure

  1. Click the Composition button Composition button.
  2. Click the composite class.
  3. Click the part class.
  4. If wanted, name the composition.
  5. Press Enter to dismiss the text box.

Feedback