Class

CLASS NAME
-Attribute_1: type
-Attribute_2: type
-Attribute_3: type
+Method_1(): type
+Method_2(): type
+Method3(): type

That is, three cells:
Cell One - Class name
Cell Two - Attributes (possibly with type)
Cell Three - Methods (possibly with function input types and output type)

Child Class

Syntax: Connect the child to the parent with a hollow triangle
A ‘is a kind of’ relationship.

Associations

Syntax: Connect the two classes with a solid line
A ‘has-a” relationship.

Aggregation (◊)

Syntax: Connect the element to the container (diamond on the container)
The contained item is an element, but can also exist on its own.
Aka the container will function with or without the element.
(ie A room contains computers - each computer does not rely on its existence in the room)

Composition (♦)

Syntax: Connect the element to the container (diamond on the container)
The element is an integral part of the container.
Aka the container will not function without the element.
(ie the leg of a desk)

Cardinality

  • One to One
  • One to Many
  • Many to Many