Aggregation and composition in UML 2.0

Hi,

a) I've been told that aggregation and composition do not exist in UML 2.0. Is it true? Then how are these relations written?

b) We have UC 1 and UC 2. They include UC 3 (abstract). Then in UC 3 sequence diagrams, the start message wouldn't be from an actor, but from an Object. Is it correct?

c) UC 4 is started when it receives a signal from a motion detector. Then a simple class (motion detector) can send the start message of UC 4 sequence diagram?

Thanks!

[498 byte] By [devesaa] at [2007-10-2 8:27:38]
# 1

> Hi,

>

> a) I've been told that aggregation and composition do

> not exist in UML 2.0. Is it true? Then how are these

> relations written?

didn't know they were removed. they used to be indicated with a diamond; one was filled in, the other not.

> b) We have UC 1 and UC 2. They include UC 3

> (abstract). Then in UC 3 sequence diagrams, the start

> message wouldn't be from an actor, but from an

> Object. Is it correct?

whatever makes it clearer to the reader would be my choice.

> c) UC 4 is started when it receives a signal from a

> motion detector. Then a simple class (motion

> detector) can send the start message of UC 4 sequence

> diagram?

>

> Thanks!

You sound like you're too worried about getting uml semantics perfect. personally, i only care about communicating my intent.

%

duffymoa at 2007-7-16 22:28:01 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

> a) I've been told that aggregation and composition do

> not exist in UML 2.0. Is it true? Then how are these

> relations written?

No. As documented on page 135 - 136 of the UML 2.0 Superstructure specification, they still exist. It would be foolish to eliminate them. Sounds like your source is quite ignorant of the standard.

> b) We have UC 1 and UC 2. They include UC 3

> (abstract). Then in UC 3 sequence diagrams, the start

> message wouldn't be from an actor, but from an

> Object. Is it correct?

When documenting a use case with sequence diagrams, the outer most diagram (in case you zoom-in to see detail in multiple diagrams) is always initiated by an actor. The actor's type may not be known in an abstract use case like UC3 as it is invoked only via other use cases and their actors.

> c) UC 4 is started when it receives a signal from a

> motion detector. Then a simple class (motion

> detector) can send the start message of UC 4 sequence

> diagram?

Well, it could, but (more properly IMHO) the motion detector would be represented by an actor (probably called Motion Detector, Moving Object or Object in Motion?) The later two are better names if the motion detector is considered within the boundary of the system (it is HOW motion is detected) and the moving object (te WHAT and the real trigger) is the actor.

cmccorveya at 2007-7-16 22:28:01 > top of Java-index,Other Topics,Patterns & OO Design...