1. Overview

What happens if we want to model automobiles in UML. We can have a class called Car to model cars in general and a subclass Sedan to model a kind of car. But how do we relate a class Tires to Car?

Obviously all cars have tires but a tire isn't a kind of car. The relationship we are trying to model isn't is_a but part_of: A Tire is part_of a Car.

There is a relationship of aggregation: there is a relation part->whole, a tire (part) is a part of car (whole).

Figure 9.1. Car as a collection of parts

Car as a collection of parts

Classes can be associated to other classes by other properties other than inheritance.