Question

I am bit new to all this UML, so I hope you all would bear with me and my rookie question.

During OOA when you'll alway draw a domain model. It shows the concepts, it's attributes, and the relations (association) between each concepts.

But I haven't understood Whole - to - part associations yet. As far as i've understood, it has something to do with a concept beeing associated to multiple concepts, am i right?..

And is it possible to aggregate an association, or is it strictly concepts which can be aggregated???

My confusing may be due to the fact that i am bit unclear on when to use aggregation in the first place...?? could someone clarify it for me??

Était-ce utile?

La solution

Your question is vague, but let's start here from IBM's description:

http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell

Search for aggregation and composition.

Basically, aggregation is used for a class with multiple dependent components, like a car and its parts. When a car is totaled, the wheels can be removed. The wheels and may have other purposes (inventoried, repaired, recycled, etc.). Composition exists when a component's lifecycle is dependent on the parent class lifecycle. An example of composition is a business and its operations (like its loading dock). When the business closes, the loading dock is no longer necessary so both instances are deleted.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top