Is there any difference between Containment and Composition?

Answers were Sorted based on User's Feedback



Is there any difference between Containment and Composition?..

Answer / shilpa

object composition is a way to combine simple objects or
data types into more complex ones. Compositions are a
critical building block of many basic data structures,
including the tagged union, the linked list, and the binary
tree, as well as the object used in object-oriented
programming.
Composited (composed) objects are often referred to as
having a "has a" relationship.
Composition that is used to store several instances of the
composited data type is referred to as containment.
Examples of such containers are arrays, linked lists,
binary trees and associative arrays.
In UML, containment is depicted with a multiplicity of 1 or
0..n (depending on the issue of ownership), indicating that
the data type is composed of an unknown number of instances
of the composited data type.

Is This Answer Correct ?    1 Yes 5 No

Is there any difference between Containment and Composition?..

Answer / pramod

Composition that is used to store several instances of the
composited data type is referred to as containment.
Examples of such containers are arrays, linked lists,
binary trees and associative arrays.

In UML, containment is depicted with a multiplicity of 1 or
0..n (depending on the issue of ownership), indicating that
the data type is composed of an unknown amount of instances
of the composited data type.

Is This Answer Correct ?    6 Yes 13 No

Post New Answer

More UML Interview Questions

What is functional requirement?

0 Answers  


What is message-passing?

0 Answers  


What is UML diagram in C#?

0 Answers  


What are the Dynamic diagrams in UML?

0 Answers  


what is difference between old & new version of uml?

1 Answers  






What is a Persistent, Transient Object?

7 Answers   Ora Tech, Syscon, TCS,


Explain about structural diagrams?

0 Answers  


What are the key principles that underlie patterns?

0 Answers  


What are boundary, entity and control classes?

0 Answers  


What does UML stands for?

0 Answers   Futures First,


What are the relationships in UML?

0 Answers  


What do you understand by sdlc and name its processes?

0 Answers  


Categories