When do you prefer to use composition than aggregation?
Answer Posted / rajendra tambat
when you sure that the creation and destruction of part
class is in control of whole class you will use composition
where as the part can exist without whole class you use
aggrigation.
in compositition you will create the object of part as a
member variable
in aggrigation you will hold the reference to the part
class in whole class
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Name 9 modeling diagrams that are frequently used?
what the latest software develoment Methodologies?
how will u use com+ register
What shall I go for Package Diagram?
What are structural diagrams in UML?
What is profile diagram in UML?
Explain about the difficulties of interchange format of UML?
What are the elements in State Chart diagrams?
What is class diagram in UML with example?
What is object diagram in UML?
What are UML Messages?
What is the need of UML diagrams?
Why is UML used?
What is use case diagram in UML?
What does state model represent?