Class diagram (Mermaid)
A class diagram earns its place when the relationships matter more than the fields. This one shows inheritance, composition and an association carrying multiplicity at both ends.
#What this example shows
Attributes and methods with visibility markers.
Inheritance drawn with <|--, composition with *--.
Multiplicity on both ends of a relationship, which is where the real information is.
#A worked example
Open it, edit it, or copy the source below.
The source, which you can paste into a new diagram and edit:
#Making it your own
Drop the method lists if the diagram is for a non-engineering audience.
Use <<interface>> or <<enumeration>> where the stereotype matters.
Show only the classes under discussion. A whole-model class diagram is unreadable.
#Related
Copy it. Change one line. See what happens.
