•
Aggregation
is a form of association that specifies a whole-part relationship between a whole and a constituent part.
but there is ownership and child object can not belongs to another parent object.
•
•
Composition
is again specialize form of Aggregation and we can call this as a “death” relationship. It is a strong type
of Aggregation. Child object dose not have their lifecycle and if parent object deletes all child object will also be
deleted.
•
Let’s take again an example of relationship between House and rooms. House can contain multiple rooms there is no
independent life of room and any room can not belongs to two different house if we delete the house room will
automatically delete.
•
We can think about “
contains-a
” relationship.