Class Diagrams
Class Diagrams: Boxes: A Class on Paper, Arrows: Is-a, Has-a and Uses, How Many, and Who Owns It: Multiplicity and the Two Diamonds.
Updated
- Boxes: A Class on Paper (Novice): Code shows a design one line at a time, so teams draw it instead: each class as a box with its name, its fields and its methods, marked + for public and - for private, with an interface's box labeled as a promise.
- Arrows: Is-a, Has-a and Uses (Apprentice): Boxes alone don't say how classes connect, so a class diagram joins them with four arrows (inherits, implements, has and uses), each with its own line and arrowhead, and each one read out loud as a sentence about the design.
- How Many, and Who Owns It: Multiplicity and the Two Diamonds (Apprentice): An arrow says that a rental has a rentable, but not how many or who owns it; numbers on the line (1, 0..1, * and 1..*) say how many, and a hollow or filled diamond says whether the part can live without the whole.