Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Kimpan on July 19, 2006, 02:03:47 am

Title: Composition and Aggregation in Class Diagram?
Post by: Kimpan on July 19, 2006, 02:03:47 am
Hi

I just downloaded EA to try it out and wonder about the direction of 'Compose' and 'Aggregate' connection types (Using Toolbox->Class)

It seems to me that the direction of these types should be in the opposite direction according to UML 2?

When I try to describe 'A contains B' using composition relationship, I get connector drawing opposite to what I am familiar with. But the textual description is what I intended.

And how do I get an arrow to the destination (part) ?
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Kimpan on July 19, 2006, 04:33:08 am
Oh, I found the solution in the Forum in the topic "UML to C# correspondence"

Although I wonder why it is reversed from UML 2 as default?
Title: Re: Composition and Aggregation in Class Diagram?
Post by: sargasso on July 19, 2006, 04:13:20 pm
Before Paolo gets up.... ;)

Check this out http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=UMLPRO;action=display;num=1118175557;start=2#2%22

bruce
Title: Re: Composition and Aggregation in Class Diagram?
Post by: KP on July 19, 2006, 04:17:54 pm
Quote
Although I wonder why it is reversed from UML 2 as default?


It isn't. UML 2 doesn't care what direction you move the pen in drawing any connector.
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Kimpan on July 20, 2006, 04:00:33 am
Thanks for the info

Could you also tell me how to get an arrow on the destination end of the composition/aggregation?
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Jan ´Bary´ Glas on July 20, 2006, 07:17:56 am
Aggregation (Composition) Properties - Direction: Destionation -> Source
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Kimpan on July 23, 2006, 03:46:27 am
Doesn't your suggestion make the dependency go in the opposite direction? I want the dependency to be source->destination, but then I don't get the arrow at the destination end.

I would like to follow the arrows in dependency chains to see what can be reused freely or not and which components need to be stable and so on.

I would also like to see UML 2.0 to incorporate the display of bidirectional associations with arrows on both ends. But who wants it except myself?  :)
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Paolo F Cantoni on July 23, 2006, 04:38:20 am
Quote
Doesn't your suggestion make the dependency go in the opposite direction? I want the dependency to be source->destination, but then I don't get the arrow at the destination end.

I would like to follow the arrows in dependency chains to see what can be reused freely or not and which components need to be stable and so on.

I would also like to see UML 2.0 to incorporate the display of bidirectional associations with arrows on both ends. But who wants it except myself?  :)
Hi Kimpan,

Did you read the posting (of mine) that bruce mentioned about 5 posts ago?

If you use EA Associations instead of EA Aggregations you have complete control over every aspect of the rendering, including arrows at both ends (if you so desire).  UML allows that.

HTH,
Paolo
Title: Re: Composition and Aggregation in Class Diagram?
Post by: Kimpan on July 23, 2006, 01:12:20 pm
Yes I read it and it works as I intended when I use 'Associate' instead of 'Compose' or 'Aggregate'. What I wonder was if there is another, faster way to get composition looking the way I am used to.

But it's ok, although it would be nice to be able to customize 'Compose' and 'Aggregate' to the way I prefer.