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 are the different approaches to store knowledge?
Define three type of design patterns?
What are the three types of modeling in UML?
What is unified modeling language (uml)?
What is Composite Structure Diagram in UML?
What are the advantages of using UML?
What is sdlc (software development life cycle)?
What are the different steps involved in object oriented analysis?
What do you mean by focus of control?
What are class diagrams in UML?
What is static modeling and dynamic modeling in UML?
Name some of the roles that are played by the packages, modules and wrappers?
What are sequence diagrams in UML?
What is functional requirement?
Detail the meaning of association?