UML aggregation with and without arrow

I always believed that the UML aggregate is defined as a black (filled) diamond at the beginning of the path, and not an arrow to the end:

|--------|        |--------|
| :MyA   |<>------| :MyB   |
|--------|        |--------|

Today I came across such a notation as <>----->(with a clear arrow on the right end). So I looked at it in the UML 2.4 specification and actually found links for both versions.

My favorite link: “UML and Patterns” by Craig Larman mentions only the first version without an arrow. In the UML specification, I found a notice of shipping ends , but I'm not sure if this is related, and what is the difference?

Can someone explain this in more detail and give an example of using each version?

+3
source share
4 answers

"" . UML "" , , . , . UML 2.5 , - "", A composition where the end at the component class is owned by the aggregate class.. , , , A composition where the end at the component class is "navigable", :

enter image description here

. tutorial.

. , , ( ), A plain composition, , UML 2.5, "" . MyA, "" . /, , MyA MyB, , "MyA-has- MyB", , , :

enter image description here

+7

/ /. , (, ). , .

0

One arrow means the association is shipping. No arrows indicate that the association is navigable. Two arrows are down.

This can be a problem because the two ends with the navigation system undefinedlook the same, but this is standard.

You can learn more about associations / navigation / aggregations in this answer fooobar.com/questions/1015767 / ...

0
source

All Articles