Association class

from Wikipedia, the free encyclopedia

An association class in the object-oriented analysis a class whose attributes and operations of the association describing between other classes.

Association classes are used in the analysis phases of process models and are later resolved for design. To do this, either the attributes (and operations) are distributed to the classes of the association, or the association is split up by inserting the association class as a separate class.

In the UML, association classes describe, like relationships with their attributes in entity-relationship diagrams , a relationship (relationship) between two classes (entities), i.e. they take on the properties that arise from this relationship.

example

Example of an association class

Let us assume the loan of a book by a reader is to be modeled. Reader and book are modeled as classes and linked to one another via an association. An association class "Loan" can provide more detailed information such as B. save the loan date. This is connected to the association with a dashed line.

The previous association class has been resolved

The association class is now resolved in the design phase. The association is split up so that a new association now connects the “reader” class with the “loan” class and a second “loan” with “book”. The multiplicities must also be adjusted.