When do you prefer to use composition than aggregation?
Answers were Sorted based on User's Feedback
Answer / dan
Use composition if parts cannot exist w/o container; Use
aggregation if parts can exist w/o container.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / 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 |
Answer / abdul wahab
when madam says dear student use compositon we use
aggregation and when madam says use compostion we use
compositons....................
| Is This Answer Correct ? | 0 Yes | 3 No |
What are the elements in State Chart diagrams?
What are the features of UML?
Does UML diagram have relationships?
What is the difference between a component and an object?
What are the different steps involved in object oriented analysis?
Who maintains the uml specification and how is it updated?
What is dependency?
explain important relationships that are used in object- oriented modeling.
In an Java interview, the Following question was asked.. How do you represent a class in UML?
What is Association and its types?
What is a communication diagram in UML?
Explian following terms: Constraint Rules, Design by contract.