Difference between Composition and Aggregation
Answers were Sorted based on User's Feedback
Answer / benjamin jacob
Composition : Defines a strong-coupled relationship between
two entities, where the one entity is part of another, and
both need each other for their existence. e.g. Human body
and the Heart.
Aggregation : Defines a weak-coupled relationship between
two entities, where one entity could be part of another, but
either can exist without the other, independantly. e.g.
School and teacher.
Is This Answer Correct ? | 85 Yes | 5 No |
Answer / paul howard
Composition can be used to model by-value aggregation which
is semantically equivalent to an attribute. In fact
composition was originally called aggregation-by-value in an
earlier UML draft with “normal” aggregation being thought of
as aggregation-by-reference. The definitions have changed
slightly but the general ideas still apply. The distinction
between aggregation and composition is more of a design
concept and is not usually relevant during analysis.
Is This Answer Correct ? | 14 Yes | 5 No |
Write a note about inheritance?
Why do we use oops concepts? What is its advantage?
What do you mean by operator overloading?
Difference Between Attribute and Association.
What is the use of destructive method?
What is an abstract property. Give an example?
What is the purpose of late binding in object-oriented programming?
What is a subclass?
Differentiate between data abstraction and encapsulation.
What is the use if instanceof keyword? And how do refer to a current instance of object?
Can you create an instance for an abstract class?
What do you mean by Realization?