Dependency between classes means that one class uses, or has knowledge of, another class. It is typically a transient relationship, meaning a dependent class briefly interacts with the target class but typically doesn't retain a relationship with it for any real length of time.
A dependency implies only that objects of a class can work together.
The dependency relationship is often used when you have a class that is providing a set of general-purpose utility functions, such as in Java's regular expression (java.util.regex ) and mathematics (java.math ) packages. Classes depend on the java.util.regex and java.math classes to use the utilities that those classes offer.
Associations are stronger than dependencies and typically indicate that one class retains a relationship to another class over an extended period of time. The lifelines of two objects linked by associations are probably not tied together (meaning one can be destroyed without necessarily destroying the other).
Association means that a class will actually contain a reference to an object, or objects, of the other class in the form of an attribute.
Aggregation is a stronger version of association. Unlike association, aggregation typically implies ownership and may imply a relationship between lifelines.
Composition is used to capture a whole-part relationship. The "part" piece of the relationship can be involved in only one composition relationship at any given time. The lifetime of instances involved in composition relationships is almost always linked; if the larger, owning instance is destroyed, it almost always destroys the part piece.
分享到:
相关推荐
QT类 关系图QT类 关系图QT类 关系图
yii框架的类关系图(UML) 图片大图 缩略图可参考http://vmee.org/sites/default/files/field/image/yiiframework类关系图-small.jpg 找了半天才找到的大图
live555类关系图,挺详细的啊。 请使用。 谢谢。
qt5.1类关系图pdf格式,docx文档说明,可以参考,剩余的字补充字数。可以很清晰的查看qt5的继承关系,对qt的编程很有用处
live555类关系&结构图&博客&协议说明
live555 类关系框图 包含了live555所有类之间以及它们之间的关系
包含 Qt4类关系图(基于Qt4.8) 和 Qt5类关系图(基于Qt5.1),帮助Qt开发人员系统了解Qt框架的脉络,对于初学者很有帮助。
unity 类关系图
qt类关系图,包含qt5.1和qt4,对于学习QT有很大帮助。
C/C++类关系 说明了类中的各种关系:关联、聚合/组合、依赖、泛化(继承)
时下流行的CQRS框架的类关系总图,查看此图CQRS原理一目了然。
Actionscript 3.0 类关系图 介绍各个类之间的关系图。PDF格式
UML类关系-依赖,关联,聚合和组合 这几种关系很容易混淆,一个总结文档。
PROE关系式精讲,,主要内容是将PROE类关系式,从基础到高级,,,,文档格式,希望对大家有所帮助,谢谢
AS3.0类关系图.PDF格式 把所有类都分好图形
NULL 博文链接:https://yunzhongxia.iteye.com/blog/1157525
图书管理系统类及类关系.ppt
DesignPattern_BasicKnowledge设计模式之类关系:设计模式 类关系 基础 依赖 关联
WTL,atlwin.h 类关系根据自己实践,详细介绍了atl基本类的相互之间的继承关系,对于wtl初学者有较大帮助
C++ MSDN的类总图,显示了所有类 之间的关系 非常有用!~~