Differentiate between Aggregation and containment?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is virtual?

742


Describe the Diamond problem. Where does this problem occur?

557


What is the diffrence between an abstract class and interface?

617


Which oops concept is used as reuse mechanism?

2893


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

527






What is the difference between multiple and multilevel inheritance?

581


What is meant by “abstract interface”?

613


What is the difference between a class and a structure?

517


Can we use static method definitions in interfaces?

558


What is Overloading ? Is it similar to overriding ?

586


Can you give some examples of tokens?

650


What is @functionalinterface?

584


What is early and late Binding?

579


What is Abstract method and how different from Virtual Method?

528


Write down how will you create a Binary tree?

606