Aggregation versus Composition

From CSSEMediaWiki
Revision as of 06:50, 9 September 2008 by Jason Clutterbuck (Talk | contribs)
Jump to: navigation, search
Aggregation versus Composition

Wikipedia provides us the university example to illustrate the difference between aggregation and composition.


Composition (represented by the solid diamond) occurs inside objects when the relationship is such that if the super-object is destroyed the sub-object also ceases to exist. In this example if the university is closed the departments also close.

Aggregation (represented by the hollow diamond) occurs in the case where the destruction of one object does not end the existence of the other. When the university closes the professors continue to exist.

Personal tools