UML Aggregation
64whole/part relationship
Aggregation is a whole/part relationship. This relationship denotes that the aggregate class (the class with the diamond touching it) is in some way the “whole”, and the other class in the relationship is somehow “part” of that whole.
There is not likely to be much difference in the way that the two relationships, Aggregation or Association, are implemented. That is, it would be very difficult to look at the code and determine whether a particular relationship ought to be aggregation or association. For this reason, it is pretty safe to ignore the aggregation relationship altogether. As the amigos said in the UML 0.8 document: “...if you don’t understand don’t use it.”
Implementation in C++
class Window
{public://...private:vector<Shape*> itsShapes;};Strong form of Aggregation
Strong form of Aggregation is Composition (black diamond).
PrintShare it! — Rate it: up down flag this hub









Cristi says:
2 months ago
I think the difference between association and strong aggregation is in the ownership of the "part". In terms of the implementation, for example, if A has B (strong aggregation), then A is responsible for creating B. If between them is a simple association, then the creation and ownership is left to other entity.