Skip to content

6.6 Class diagram

The complete class diagram now looks like this:

Abstract Shape, Circle, Rectangle, Point and Surface holding a list of shapes on a sized canvas Abstract Shape, Circle, Rectangle, Point and Surface holding a list of shapes on a sized canvas
  • The Surface class contains 0 or more objects of the Shape class.
  • An object of the Shape class can be placed in 0 or more Surface objects.
  • A surface knows about the shapes it contains.
  • A shape does not know in which surfaces it is placed.

+ means public
- means private
# means protected
<<constant>> means constant field (PascalCase per C# conventions)
Underlined means static
<<abstract>> is a stereotype that labels a class as abstract. In UML, italics mark an abstract class or abstract operations.
White triangle means derived class
Open arrow means unidirectional