Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML composition 1.* and 0.*

Tags:

uml

I have a question in UML. I'm a beginner in UML and I do not know if I can do this :

UML

like image 404
Pierre Colart Avatar asked Dec 05 '17 16:12

Pierre Colart


People also ask

What does 0 * mean in UML?

The "0.. *" notation is used to denote "zero or more" (many). The following notation indicates that every object in Class A is associated with zero or more objects in Class B, and that every object in Class B is associated with exactly one object in Class A.

What does 0 * mean in multiplicity?

Exactly one object. This is the default multiplicity of an association according to UML. 0..* No object or at least one.

What is OO in UML?

Object-Oriented Concepts UML can be described as the successor of object-oriented (OO) analysis and design. An object contains both data and methods that control the data. The data represents the state of the object. A class describes an object and they also form a hierarchy to model the real-world system.

What is the UML notation for composition?

The composition relationship is represented by a straight line with a black diamond at one end. In UML, it can exist between two or more classes. It is a part of the association relationship. It is a part of the aggregation relationship.


1 Answers

You can't. A composition means a whole/part relationship and it can only be 0*-1, 1*-1 or 0*-0..1 at most.

For more information on the subject I'd read this: https://www.uml-diagrams.org/composition.html

EDIT: Think about what a whole/part relationship is. A bedroom is part of a house, but the same bedroom cannot belong to multiple houses. However, a house can have multiple bedrooms. This is the same kind of relationship as in the house/bedroom case.

like image 98
Carlos M. Hernández Avatar answered Oct 30 '22 03:10

Carlos M. Hernández