aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes composit component in UML 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "composit component in UML 2.0" Watch "composit component in UML 2.0" New topic

composit component in UML 2.0

Jean louc Rippon
Ranch Hand

Joined: May 24, 2006
Posts: 44
I�d like to ask you a question about modelling composit component in UML 2.0:
If we have component C which continent some sub-components, for instance C1,C2, C3. As I know, in order to model such a component, we write C with (c1: C1, c2:C2, c3:C3) that�s means: the component C with instances of C1, C2 and C3 and not C1, C2, C3 them-self.
My question, if (for instance) C1 have, in its turn, sub-components (C11, C12), in this case, how we can model C, C1 and their sub-components C11, C12 in UML 2.0

Sincere thanks.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You just wind up with a tree. C has lines to C1, C2, C3. C1 has lines to C11 C12, C13, etc. A complex tree can quickly get too large to take in on a single diagram. That's where it's nice to distinguish between the model which contains everything and a diagram which shows some small part of the model for some specific purpose. For example, a diagram with C, C1, C2, C3 is perfectly valid for a particular level of abstraction. Another diagram with C1, C11, C12, C13 is good at another level.

Bookmark Scott Ambler's Agile Modeling site. I refer to it fairly often.

Diagrams of UML 2


Scott pops in here now and then, too. He's pretty big on that "purpose" I mentioned above. I like to fill in "_______ reads this to learn ________ so they can ________" That will help you know what level of abstraction to put in, or whether to skip the diagram entirely.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
It is sorta covered in the JavaRanch Style Guide.
subject: composit component in UML 2.0