posts - 6,  comments - 0,  trackbacks - 0

relation in the OOAD

dependency : the most relation between two classes
association: if one class is one member of the other class
aggregation: one association relation. Two objects have the "has a" relation and have different life cycle. Usually client can set the member object when create one new object. (that is to say, the outer class has one constructor which has one parameter of inner class).
composition: Relation is tighter than aggregation. Two objects have the "contains a" relation and have same life cycle. Usually the inner object is created by outer object. (that is to say, the inner object is create in the constructor of outer object)

posted on 2006-08-29 11:27 wing 阅读(209) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。