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 virtual function and pure virtual function ?

0 Answers   Infosys,


What does the keyword virtual represented in the method definition?

0 Answers  


Why do we use oops concepts? What is its advantage?

0 Answers  


What is the difference abstract class and interface?

0 Answers  


What is serialization? How do we implement serialization actually?

0 Answers  


What is SRD(System Requirement document), FSD (Functional Specification Document), RSD (Requiremnet specific document)? If these are different document wat are there contents?

1 Answers   College School Exams Tests, HP, Infosys,


What is the difference between an error and an exception?

0 Answers  


How many methods are there in the externalizable interface?

0 Answers  


What is an abstraction?

0 Answers  


What if we make the method as abstract in another interface?

0 Answers  


Explain basic concepts of OOPS?

0 Answers  


Where shall I go for Package Diagram?

1 Answers   Protech,


Categories