Differentiate between Aggregation and containment?

Answers were Sorted based on User's Feedback



Differentiate between Aggregation and containment?..

Answer / arul

Aggregation is the relationship between the whole and a
part. We can add/subtract some properties in the part
(slave) side. It won?t affect the whole part.
Best example is Car, which contains the wheels and some
extra parts. Even though the parts are not there we can
call it as car.
But, in the case of containment the whole part is affected
when the part within that got affected. The human body is
an apt example for this relationship. When the whole body
dies the parts (heart etc) are died.

Is This Answer Correct ?    33 Yes 7 No

Differentiate between Aggregation and containment?..

Answer / msh

Aggregation is interobject relationship. This relationship
occurs when one class contains another class.

Is This Answer Correct ?    4 Yes 3 No

Differentiate between Aggregation and containment?..

Answer / kundan lal

There is NO difference between aggregation and containment.
There is a difference, however, between aggregation and
composition.

Is This Answer Correct ?    0 Yes 9 No

Post New Answer

More OOAD Interview Questions

What are the features that are provided to make a program modular?

0 Answers  


Is it possible to provide method implementations in java interfaces? If possible, how do we provide them?

0 Answers  


How can we restrict inheritance for a class so that no class can be inherited from it?

0 Answers  


Can an interface implement or extend another interface?

0 Answers  


What do you mean by operator overloading?

0 Answers   BirlaSoft,






What are the methods required to create changes in subclasses?

0 Answers  


What is the use of finalize method?

0 Answers  


What is an abstraction and why is it important?

0 Answers  


Explian following terms: Constraint Rules, Design by contract.

1 Answers   Protech,


Difference between composition and inheritance ?

0 Answers  


What is a functional interface? What is sam interface?

0 Answers  


What is method overriding?

0 Answers  


Categories