This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 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.
-howru(How are you?);
2001-3-29
(#38604@0)
-
Yes, I'd like to know the answer. Somebody please help!
-eglington(eglington);
2001-3-29
(#38605@0)
-
The simplest is dependencyDependency is where one object must know about another.
In a simple dependency relationship all we know is that one object has knowledge of another. For example, in C++, if one class requires the inclusions of the header for another, that establishes a dependency.
-flying_snow(飞雪浮冰);
2001-3-29
{265}
(#38610@0)
-
My AnswerAssociation: Models a semantic connection among classes
Aggregation: A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts
Composition:A form of aggregation with strong ownership and coincident lifetimes(The parts cannot survive the whole/aggregate)
-liweizhang(Panda);
2001-3-29
{316}
(#38613@0)
-
One step up from dependency is association.
-flying_snow(飞雪浮冰);
2001-3-29
{577}
(#38616@0)
-
Aggregation models the whole/part relation.Objects are ofter made up of other objects. Cars are made up of steering wheels, engines,transmissions and so forth. Each of these components may be an object in its own right. The special association of a car to its component parts is known as aggregation.
-flying_snow(飞雪浮冰);
2001-3-29
{257}
(#38619@0)
-
最后声明:我手头正好有一本书,我照抄的,希望对你有所帮助 :-)
-flying_snow(飞雪浮冰);
2001-3-29
(#38621@0)
-
推荐一本好书 -- Beginning Object-Oriented Analysis and Design with C++, 作者 Jesse Liberty。ISBN 1-861001-33-9。 价格$48.95 CND or $34.95USD
-flying_snow(飞雪浮冰);
2001-3-29
(#38624@0)
-
谢谢!我这就去借一本看看。
-eglington(eglington);
2001-3-29
(#38627@0)
-
Recommend a very nice website - www.umlchina.com, there are tons of doucments and softwares about OOD, OOA, OOP, Pattern Design, UML and Pational Rose. most of them r pdf format, easy to be printed.
-guest:;
2001-3-29
(#38646@0)
-
Thank you.
-firefox99(firefox99);
2001-3-29
(#38649@0)
-
你忘留电话了,打个电话过来吧
-wjiang(wjiang);
2001-3-29
(#38678@0)
-
昨天跟你家领导聊的太投入了,一放下电话,想起来了。给你发个邮件吧。
-firefox99(firefox99);
2001-3-29
(#38681@0)