UML Class Diagrams

Home Up Search Java 2 API C++ Resources

Features of a UML class diagram

In a UML class diagram, you will see:

  1. Classes represented by boxes.   The name of the class will be shown as well as any conceptual roles that the class plays in the system.  In addition, you will see these features:
    1. All the properties (attributes) of the class, their visibility and optionally, their type.
    2. All the methods of the class, their visibility and optionally, their argment(s) and return types.
  2. Interfaces represented by boxes.  The name of the interface will be shown as well as any conceptual roles that the interface plays in the system.  In addition, you will see:
    1. All the methods of the interface, their visibility and optionally, their argment(s) and return types.
  3. Relationships represented by lines between classes.   These lines may have several meanings:
    1. Inheritance:  Represented by solid arrows (closed head) which point from a class to its superclass. 
    2. Implementation:  Represented by dotted arrows (closed head) which point from a class to the interface it implements.
    3. Composition:  Represented a line connecting two classes with either a filled or empty diamond at the class that holds an instance of the other class as one of its properties.  At the end of the held class, a number may be present to show how many instances are held.   Also optionally, the role or variable name of the instance may be shown.
    4. Usage:  Represented by dashed arrows (open head) with a description of the usage.   For instance, the arrow might show that a class instantiates the class pointed to by the arrow but without holding it as a property. 
  4. Notes about particular classes and interfaces represented by boxes with a "dog-eared" corner connected to the class/interface with a dashed line.  Often descriptions or code snippets will be shown.