深入理解UML中的依赖和关联

前端之家收集整理的这篇文章主要介绍了深入理解UML中的依赖和关联前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

An Association implies two model elements have a relationship,usually implemented as an instance variable in one Class. This connector can include named roles at each end,multiplicity,direction and constraints. Association is the general relationship type between elements. To connect more than two elements in an association,you can use the N-Ary Association element.

When code is generated for Class diagrams,Associations become instance variables in the target Class. The relationship is also used in Package,Object,Communication, Data Modeling and Deployment diagrams.

Dependency relationships are used to model a wide range of dependent relationships between model elements in Use Case, Activity and Structural diagrams,and even between models themselves. You can create the Dependency from the Common page of the Enterprise Architect UML ToolBox. The Dependencies package as defined in UML 2.1 has many derivatives,such as Realization, Deployment and Use. Once you create a Dependency you can further refine its meaning by applying a specialized stereotype.

猜你在找的设计模式相关文章