One step up from dependency is association.

flying_snow (飞雪浮冰)
In an association, the state of the object depends on another object.
In an association we say that, as part of understanding the state of one object, you must understand the relationship with the second object. There are many types of association which model real-world relationships such as owns (John owns this car), works for(Pete works for Bill) and so forth.
In an association the two objects have a strong connection but neither one is a part of the other. The relationship is stronger than dependency; there is an association affecting both sides of the relationship.
2001-3-29 -05:00

回到话题: OO. I know the relationship between Composition and Inheritance. But I can't understand clearly about Aggregation, Association, and Dependency. Would you please help me clarify them? tks.

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论