0

Note: This is not the duplicate of uml-aggregation-with-and-without-arrow-head but the improved and rectified version of it!

In uml-aggregation-with-and-without-arrow-head, aggregation was explained as a black FILLED diamond. That is obviously WRONG as a FILLED diamond is a composition. Until now I haven't seen the composition with arrow head, so my question is in the context of aggregation

Motivation of my question came from the Gof23. The class diagram in that book contains the aggregation with arrow head. So I am very confused about it as I usually only use the aggregation without arrow head

Question: What is the difference between aggregation with an arrow head <>-----> and aggregation without arrow head<>-----?

Rui
  • 3,454
  • 6
  • 37
  • 70
  • 2
    Possible duplicate of [Aggregation and navigability at the same end](https://stackoverflow.com/questions/47855657/aggregation-and-navigability-at-the-same-end) – Geert Bellekens Mar 18 '18 at 07:22
  • 1
    This is still a duplicate. The answer provided to the other question remains valid for this one as it clearly indicates "**any** association". It doesn't matter if you have shared or composite aggregation. Also in a new version of the specification terms `shared aggregation` and `composite aggregation` are preferred over older terms `aggregation` and `composition`. So a reference to aggregation covers both cases and aggregation is depicted in general with a diamond, while hollow or filled indicates only if the aggregation is shared or composite. – Ister Mar 18 '18 at 10:17
  • 1
    Possible duplicate of [UML Aggregation with and without arrow head](https://stackoverflow.com/questions/21738757/uml-aggregation-with-and-without-arrow-head) – Ister Mar 18 '18 at 10:18

1 Answers1

1

The answer to your question is the same as my answer to the question

What is the difference between composition with an arrow head <>-----> and composition without arrow head <>-----?

see https://stackoverflow.com/a/21767999/2795909, except that you have to replace the solid diamond (for composition) with the hollow diamond (for aggregation).

Since you ask about the use of the navigability arrow, the answer does not depend on the kind of association (plain, aggregate, composite). So, you could also entirely drop the diamond and ask

What is the difference between association with an arrow head -----> and association without arrow head -----?

and still get the same answer.

Gerd Wagner
  • 5,481
  • 1
  • 22
  • 41