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
Is Visio a UML tool?
What are the elements which are utilized in the state chart diagram?
What relations are there between the Class Diagrams and Domain models.
Explain about structural diagrams?
Who maintains the uml specification and how is it updated?
Why is it required to have an abstraction layer in uml?
Name some of the roles that are played by the packages, modules and wrappers?
What are the types of event?
What are various kinds of invariants and rulesets used in uml?
Define link and association?
What are the different parts of a deployment diagram?
Explain the types of diagrams in UML.
Explain about executable UML?
What are the parts of a deployment diagram?
In which phases of Unified process is project deployement dealt with?