When do you prefer to use composition than aggregation?
Answer Posted / 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 View All Answers
What are the various types of constructors?
Why dynamic binding is used in object-oriented programming?
Can we override static methods? Why?
Is it possible to override private virtual methods?
What is static polymorphism?
What are the basic concepts of oop?
What does it mean that a method or class is abstract?
When will you use an interface and abstract class?
How many methods are there in the serializable interface?
Write basic concepts of oops?
Explain colloboration
Is it possible to provide method implementations in java interfaces? If possible, how do we provide them?
How a program can be structured using the concept of object oriented programming?
What are a base class, subclass, and superclass?
What is the main advantage of using inheritance?