UML

UML Notations

Aggregation
Aggregation is a special type of association used to model a “whole to its parts” relationship. In basic aggregation relationships, the lifecycle of a part class is independent from the whole class’s lifecycle. For example, we can think of Car as a whole entity and Car Wheel as part of the overall Car. The wheel can be created weeks ahead of time, and it can sit in a warehouse before being placed on a car during assembly. In this example, the Wheel class’s instance clearly lives independently of the Car class’s instance. However, there are times when the part class’s lifecycle is not independent from that of the whole class — this is called composition aggregation. Consider, for example, the relationship of a company to its departments. Both Company and Departments are modeled as classes, and a department cannot exist before a company exists. Here the Department class’s instance is dependent upon the existence of the Company class’s instance. (more…)

Advertisements