Re: Re: aggregation and states



Date view Thread view Subject view Author view Attachment view

From: Les Munday (baldrick@ureach.com)
Date: Mon 03 Jun 2002 - 23:53:48 BST


> 
> Maybe you mean composition? What example do you have in mind?
> The Wheel-Car example mentioned by Les seems to be rather a 
case of
> composition than aggregation. One has to be careful, since 
some
> authors seem to say "aggregation" for what UML calls 
composition (this
> has a history in philosophy and in data models).
> 
> IMHO the essential difference between the two is:
> 
> . a composite object/class *is* a whole, its parts are shown 
nested in
>   it, and are hidden in a high-level view
>   -> the whole is model element.
> 
> . an aggregate object/class *represents* a whole (cf UML 
glossary)
>   -> this whole might be a non-model-element.
> 

My understanding is that in a 'composition' the parts do not 
exist outside of the parent, it is the responsibility of the 
parent to create the parts.

In an 'aggregation', the whole is the sum of its parts, but its 
parts have lives outside of the whole thing.

So in my example of a car with wheels is an aggregation, 
because a wheel has a life outside of a car in most cases, 
(although one could envision system scope that did not allow 
wheels to exist outside of the car).

Les.

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

Date view Thread view Subject view Author view Attachment view