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
Explain about inheritance hierarchies?
Can we access interface static method using interface references?
Explain about multiple inheritance?
what three "domains" are considered during analysis modeling?
What are the access modifiers?
What is the default access modifier for a class,struct and an interface declared directly with a namespace?
Whether static method can use nonstatic members?
Can we use static method definitions in interfaces?
Is iterator a class or interface? What is its use?
What is the difference between an Abstract class and Interface?
What are the methods required to create changes in subclasses?
What is a subclass?
Explain about the analysis phase?
Can an interface inherit from another interface?
Describe inheritance and non-inheritance of a derived class?