深入理解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.

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...