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 is a ternary operator?

0 Answers  


How to resolve many to many relationship?

6 Answers   InfoAxon Technologies, Protech, Samsung,


What if we override the conflicting method in the class?

0 Answers  


Explain about polymorphism?

0 Answers  


What is operator overloading and polymorphism?

0 Answers   ITC Indian Tobacco Company,






In winform my controls [taskbar and progressbar] become inactive when heavy processing is going in background, how to avoid this via multithreading

1 Answers   Hexaware,


What is the use if instanceof keyword? And how do refer to a current instance of object?

0 Answers  


Differentiate between Aggregation and containment?

3 Answers  


Can we override a method by using same method name and arguments but different return types?

0 Answers  


What is Object Constraint Language (OCL)?

1 Answers   Protech,


Can you create an instance for an abstract class?

0 Answers  


Explain about Overloading vs Overriding ?

0 Answers  


Categories