Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to *really* write UML cardinalities?

Tags:

I would like to know once and for all how to write UML cardinalities, since I very often had to debate about them (so proofs and sources are very welcome :)

If I want to explain that a Mother can have several Children but a Child has one and only one Mother, should I write:

Mother * ---------- 1 Child 

Or

Mother 1 ---------- * Child 

?

like image 319
sp00m Avatar asked Jul 18 '13 13:07

sp00m


People also ask

What does 1 * mean in UML?

What does 1 * mean in UML? If you have 1.. * on the Class end that means that a Student has at least 1 and possible more Classes . 0.. * on the Class end means that a student could also have no Classes at all.29-Dec-2015.

What is 0 * means 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 is Asterisk in UML?

When you make changes to a model, an asterisk (*) appears beside the model name in the Project Explorer view, indicating that the model has unsaved changes. If you have the model open in the Model Editor view, or diagrams open in the diagram editor, an asterisk appears beside the name on each tab.


2 Answers

the second one Mother 1 ----------------- 1..* Child

You would find many example in the UML specification for all figure related to the Abstract Syntax...

like image 114
Red Beard Avatar answered Oct 05 '22 22:10

Red Beard


Of course Red Beard is right, the correct answer is the second one.

As for a tip for remembering this, I advise to think in english: You say "A child has ONE mother", and in this sentence like in UML, ONE is written next to Mother. Fairly simple.

like image 41
Steph Avatar answered Oct 06 '22 00:10

Steph