Does an association imply a dependency in UML? [closed]

我的梦境 提交于 2019-11-29 11:46:15

Dependencies and associations are two different concepts. According to the UML metamodel, both are two independent subclasses of the "Relationship" metaclass.

However, it is true, that in your scenario I'd just model an association between the two classes and not a dependency. The fact that the two classes are connected through an association already make them dependent.

I would argue it really depends what you are trying show with the particular diagram. You could model it with either. You could even use composition if it made sense in the context.

Thavatchai Ngamsantivong

There are three class, the first is MainClass, the second is Something, and the third is OtherClass. It is so simple if you use UML tools to generate the class you will see the diagrams. It is compose of thee class. I believe the dash line connected between MainClass and OtherClass. The line(association) connected between MainClass and Something.

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