Difference between Composition and Aggregation

Answers were Sorted based on User's Feedback



Difference between Composition and Aggregation..

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

Difference between Composition and Aggregation..

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

Post New Answer

More OOAD Interview Questions

What is meant by inheritance? what are the advantages of inheritance?

0 Answers  


What do you mean by data hiding?

0 Answers   Tavant Technologies, Virtusa,


Giving reasons explain two external responsibilities of a project manager.

2 Answers  


Tell me something about abstract classes?

0 Answers   TCS,


Difference: Object Oriented Analysis (OOA) and Object Oriented Design (OOD)?

2 Answers   CSC, HCL,


What is the abstract method modifier?

0 Answers  


What is the function of dynamic typing?

0 Answers  


How do you prevent a class from being inherited by another class?

0 Answers  


Can different parts of a partial class inherit from different interfaces?

0 Answers  


What are the properties that are defined in an object model?

0 Answers  


Explain the purpose of composition.

0 Answers  


What is association?

2 Answers   Protech, Wipro,


Categories