How do UML class diagrams represent relationships like inheritance, composition, and association, including multiplicity?

Last updated 5 July 2026

  • Inheritance: solid line with hollow triangle pointing to the parent (dashed for interface realization). Association: plain solid line, open arrowhead for navigability. Dependency: dashed line with open arrowhead.

  • Aggregation uses a hollow diamond at the whole (parts can outlive it). Composition uses a filled diamond (parts die with the whole).

  • Multiplicity at line ends: 1, 0..1, * (many), 1..* (one or more). Example: one Order has 1..* LineItems.

  • https://uxxu.io/guides/uml/
  • https://www.geeksforgeeks.org/system-design/unified-modeling-language-uml-class-diagrams/
  • https://dev.to/tommyc/common-types-of-oop-relationships-and-their-uml-representation-5b27
  • https://www.jointjs.com/blog/uml-class-diagrams
  • https://www.gleek.io/blog/multiplicity-class-diagram
  • https://lucid.co/diagram/uml/class-diagram-tutorial
  • https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/
All Object-Oriented Programming interview questions