Is there any difference between Containment and Composition?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are UML Messages?

550


Is use case diagram static or dynamic?

584


Explain all elements of a State-chart diagram.

556


Can you tell us a few advantages of creating a model?

560


What is component diagrams in UML?

620






What are the advantages of creating a model?

477


What does UML stands for?

644


Define link and association?

577


What are the different views in UML?

537


Why do we need UML diagrams?

577


What are the key principles that underlie patterns?

546


What is UML and its features?

539


What is UML state diagram?

598


What are the different steps involved in object oriented analysis?

543


Why are attributes used in uml?

602