When do you prefer to use composition than aggregation?



When do you prefer to use composition than aggregation?..

Answer / naveen sisupalan

Composition is a stronger form of aggregation. If you are
sure that the life of the part is managed entirely by the
whole then you can go for composition. Without whole, the
part can't exist also.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More OOAD Interview Questions

Explain about polymorphism?

0 Answers  


Define Data Abstraction. What is its importance?

0 Answers   Amazon, Infosys,


Is class an Object? Is object a class?

11 Answers  


What are the four important foundation concepts of OOP ?

0 Answers   Wipro,


What are a base class, subclass, and superclass?

0 Answers  






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

0 Answers  


What is a static method? Why do we need static methods in java 8 interfaces?

0 Answers  


What is bootstrap, extension and system class loader?

0 Answers  


What is a Persistent, Transient Object?

2 Answers   Protech,


What is super keyword?

0 Answers  


What is the use of Operator Overloading?

1 Answers   Protech,


How many methods are there in the externalizable interface?

0 Answers  


Categories