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
What is state machine diagram in UML?
What are the advantages of using UML?
Explain all elements of a State-chart diagram.
What are the goals of UML?
Does Visio Standard have UML?
Explain about package diagram?
What do you mean by focus of control?
What are the different types of UML diagrams?
What are the different parts of a deployment diagram?
What are the features of UML?
Can you name the different elements with the collaboration diagram?
What is sdlc (software development life cycle)?
How a uml use case is diagram different from a traditional flow chart?
What is UML and its features?
Is UML restrictive to system development?