XML.com: Guide to UML Class Diagrams
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
Bookmark History
Public Sticky notes
Relationships
The relationships between two classes can be of the following three types:
- Association
- Aggregation
- Dependency
An Association is a bi-directional connection between classes (e.g. the "hires/works for" relationship between an "employee" class and a "boss" class). It is represented by a solid line.
An Aggregation is the relationship between the whole and its parts. An aggregation is represented as a line connecting the related classes with a diamond next to the class representing the whole.
A Dependency is a relationship where the client does not have semantic knowledge of the supplier. It can be used, for example to show the relationship between an "encoder" class and a "genericAlgorithm" class that is inserted in runtime to help it encode a stream. A dependency is shown as a dashed line pointing from the client to the supplier.
Finally there is Inheritance. Inheritance is represented by a line ending on a triangle on the parent class.
The following example illustrates the concepts above

Highlighted by mikeem
Highlighted by mikeem


Public Comment