UML class diagram (D2)
D2 has a class shape with typed fields and methods, so a class diagram does not need a second language.
#What this example shows
shape: class, with fields and methods declared inline.
Visibility markers on members.
Relationship arrows with labels.
#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
Prefix members with +, - or # for public, private and protected.
A trailing (): type marks a method rather than a field.
For full UML with stereotypes and packages, PlantUML goes further.
#Related
Nesting is the whole idea.
