When do you prefer to use composition than aggregation?

Answers were Sorted based on User's Feedback



When do you prefer to use composition than aggregation?..

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

When do you prefer to use composition than aggregation?..

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

When do you prefer to use composition than aggregation?..

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

Post New Answer

More UML Interview Questions

State some of the criticisms present with UML?

0 Answers  


What is UML diagram in C#?

0 Answers  


Difference: Activity Diagram and Sequence Diagram.

6 Answers  


Why are attributes used in uml?

0 Answers  


Does UML diagram have relationships?

0 Answers  


What is static modeling and dynamic modeling in UML?

0 Answers  


Explain about behavioral diagrams?

0 Answers  


Name 9 modeling diagrams that are frequently used?

0 Answers  


What is the function of attribute facets in uml?

0 Answers  


What is the purpose of a use case diagram?

12 Answers   Satyam,


What are the elements which are used in activity diagrams?

0 Answers  


What are interfaces in UML?

0 Answers  


Categories