UML: Difference between revisions
Line 17: | Line 17: | ||
:[[File:UML_Association_2.png]] | :[[File:UML_Association_2.png]] | ||
The multiplicity of the relationship can be represented by annotated each end with *, 0, 1. This number is also referred to as cardinality, but cardinality is not the correct term. <font color=darkkhaki>Cardinality refers to the actual number of items in a set, whereas multiplicity specifies how small or how large the set could be.</ | The multiplicity of the relationship can be represented by annotated each end with *, 0, 1. A number or * nearest to a class is the number of objects of that class that can be associated with any one object at the other end of the association. | ||
This number is also referred to as cardinality, but cardinality is not the correct term. <font color=darkkhaki>Cardinality refers to the actual number of items in a set, whereas multiplicity specifies how small or how large the set could be.</font>. |
Latest revision as of 23:34, 26 July 2022
Internal
Overview
UML stands for Unified Modeling Language. UML is useful to quickly communicate the structure and associations within a set of classes.
In UML most things are optional, we only need to specify as much information in a diagram as make sense fr the current situation.
Association
Association is the most basic way for two classes to be related.
The association between two classes can be further refined by labeling the association, optionally with an arrow that specifies the direction of the relationship:
The multiplicity of the relationship can be represented by annotated each end with *, 0, 1. A number or * nearest to a class is the number of objects of that class that can be associated with any one object at the other end of the association.
This number is also referred to as cardinality, but cardinality is not the correct term. Cardinality refers to the actual number of items in a set, whereas multiplicity specifies how small or how large the set could be..