2. Association Classes

An association class is a class that represents an association.

Recall that simple associations are eliminated in an OO class model by turning them into reference properties of the involved object classes, as shown in Section 7. But whenever an association has attributes, it cannot be eliminated and has to be turned into a class in an OO class model.

As an example, consider the association Reservation between the object types Book and Person, allowing to express facts like "the book with ISBN 3627921105 has a reservation by the person with ID 4701199 on 2020-08-22". Since it has an attribute date, this association is modeled as an association class in an information design model, as shown in the following class diagram:

In an OO class model, which is the basis for coding the model classes of an app, association classes are turned into ordinary classes, with reference properties that reference the involved object classes. For instance, the association class Reservation is transformed into the following OO model class: