What is Navigability in UML diagrams?

巧了我就是萌 提交于 2020-06-22 22:57:27

问题


What is an example of Navigability in UML diagrams? My professor has provided the follow figure, but I can't seem to figure it out:


回答1:


This shows navigability. A can see (means it has an attribute referencing) B. In contrast B has no idea about/reference to A.

UML spec:

Arrow notation is used to denote association end navigability. By definition, all class-owned association ends are navigable. By convention, all association-owned ends in the metamodel are not navigable.

An association with neither end marked by navigability arrows means that the association is navigable in both directions.

And even more relevant:

Navigability notation was often used in the past according to an informal convention, whereby non-navigable ends were assumed to be owned by the Association whereas navigable ends were assumed to be owned by the Classifier at the opposite end. This convention is now deprecated. Aggregation type, navigability, and end ownership are separate concepts, each with their own explicit notation. Association ends owned by classes are always navigable, while those owned by associations may be navigable or not.

So you should use the dot notation instead:



来源:https://stackoverflow.com/questions/43012322/what-is-navigability-in-uml-diagrams

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!