Java Arena

Module 40

Class diagrams

UML class diagrams, the boxes and lines that show a program's classes at a glance. A class's box with its fields, constructors and methods, visibility with - and +, types and return types, writing a class from its box and drawing the box of a class, arrows for references with multiplicities such as 1, 0..1 and *, connections one way and both ways, inheritance and abstract classes, interfaces, and a whole program built from one diagram. MOOC section 11.1.

Steps

  1. A class as a box
  2. Constructors and methods in a box
  3. From code to a box
  4. Arrows between classes
  5. Many objects, and arrows both ways
  6. Inheritance and abstract classes
  7. Interfaces, and a whole program