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 |
Can you instantiate an abstract class and what is an inner class?
0 Answers Flextronics, Tavant Technologies, Virtusa,
Explain method overriding.
What is the use if instanceof keyword?
What is the difference between class inheritance and interface inheritance?
What is the significance of encapsulation?
Can we reduce the visibility of the inherited or overridden method ?
What are associative classes?
3 Answers InfoAxon Technologies, Protech,
Write down how will you create a Binary tree?
Explain about the relationship between object oriented programming and databases?
How many methods do u implement if implement the serializable interface?
What are inner classes and what is the practical implementation of inner classes?
What are the limitations of oops?