Search code examples
umlaggregationclass-diagram

Difference of UML Aggregation with and without arrow head


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<>-----?


Solution

  • 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.