Features of a UML class diagram
In a UML class diagram, you will see:
- 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:
- All the properties (attributes) of the class, their visibility and
optionally, their type.
- All the methods of the class, their visibility and optionally,
their argment(s) and return types.
- 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:
- All the methods of the interface, their visibility and optionally,
their argment(s) and return types.
- Relationships represented by lines between
classes. These lines may have several meanings:
- Inheritance: Represented by solid arrows (closed
head) which point from a class to its superclass.
- Implementation: Represented by dotted arrows (closed
head) which point from a class to the interface it implements.
- 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.
- 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.
- 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.
|