Creating aggregation associations

Associations and aggregation associations are similar in usage. An association portrays a general relationship between two classes; an aggregation association shows a whole-part relationship. When you create an association or an aggregation association between two classes and give it a role name that exists, you have created another view of the existing association.

About this task

An aggregation association is a whole-part relationship like the relationship between a composite class and a part. Other than their graphic representations, these differ mainly in that the composite/component relationship implies a whole lifetime dependency. Parts are created with their composites and are destroyed with them.

An aggregation association is shown as a line with a diamond on one end. The side with the diamond indicates the whole class, whereas the side with the line is the part class. In the following sample Aggregation Association, the diamond is placed at the first point of the aggregation:

Aggregation association

Procedure

  1. Click the Aggregation button Aggregation button.
  2. Click in the class that represents the whole.
  3. Click in the class that represents the part.

Feedback