62 3 Non-geometry standards
FR_RouteFinder
~Iength
~roadStatus
<:>setLengthQ
<:>getLengthQ
<:>setRoadStatusQ
<:>getRoadStatusQ
<:>getTrallelTimeQ
Fig. 3.3. UML class-diagram ofthe route-finder example (FR = fastest route)
Constraints are limitations within a class or within other parts of the model. In our
example the number of values per attribute are constrained to be one value. This reflects the fact that a road can usually have only one length. But we can easily think
of other road-attributes that may exist many times, such as intersections with other
roads.
Associations are semantic connections between classes. It is easy to understand
that the class RouteFinder is associated with the classes Road and City as both are
subclasses of the class RouteFinder. The class Road is also directly associated to the
class City because roads start and end at cities. Finally, the class Road has associations to its subclasses MainRoad and LocalRoad.
The quality of these associations differs slightly. The route-finder system is composed of cities and roads. This part of the relationship is called an aggregation. Both,
Road and City, have a relationship called aggregation toward the class RouteFinder.
The class RouteFinder is called the parent-class and the classes Road and City are
called the children.
If we consider our route-finder system as being complete without any plans of
later expansion, the classes Road and City are essential for the life of the system. A
strong dependency exists between the children and the parent-class and without these
classes, the system would no longer work. For example, ifthe class Road should be
deleted, the class RouteFinder no longer makes sense and must be deleted as well. In
this case, the association between both classes is strong and is called a composition.
FR_RouteFinder
~Iength
~roadStatus
<:>setLengthQ
<:>getLengthQ
<:>setRoadStatusQ
<:>getRoadStatusQ
<:>getTrallelTimeQ
Fig. 3.3. UML class-diagram ofthe route-finder example (FR = fastest route)
Constraints are limitations within a class or within other parts of the model. In our
example the number of values per attribute are constrained to be one value. This reflects the fact that a road can usually have only one length. But we can easily think
of other road-attributes that may exist many times, such as intersections with other
roads.
Associations are semantic connections between classes. It is easy to understand
that the class RouteFinder is associated with the classes Road and City as both are
subclasses of the class RouteFinder. The class Road is also directly associated to the
class City because roads start and end at cities. Finally, the class Road has associations to its subclasses MainRoad and LocalRoad.
The quality of these associations differs slightly. The route-finder system is composed of cities and roads. This part of the relationship is called an aggregation. Both,
Road and City, have a relationship called aggregation toward the class RouteFinder.
The class RouteFinder is called the parent-class and the classes Road and City are
called the children.
If we consider our route-finder system as being complete without any plans of
later expansion, the classes Road and City are essential for the life of the system. A
strong dependency exists between the children and the parent-class and without these
classes, the system would no longer work. For example, ifthe class Road should be
deleted, the class RouteFinder no longer makes sense and must be deleted as well. In
this case, the association between both classes is strong and is called a composition.
