Link and Association Concepts
Link and Association Concepts
CONCEPTS
In the problem statement provided to develop the software, link and association are presented by the verb. In
this section, we will be discussing the link and association in the context of object-oriented analysis and design.
Content: Link and Association
Let us take the two classes Person and Company. Now there is an association relation between these two
classes. Let’s say a person may own stock in zero or more companies. And it can be related in reverse that a
company may have several persons owing its stock.
The object diagram below shows the links between the objects of person and company class.
Association Name
Association name is the name that reveals the kind of relation between the classes. While modelling, it not
mandatory to name the association until it is unambiguous. Multiple associations between the same classes
then it might create confusion.
This ambiguity in the model compels to name the association between classes. For example, a person own
stock in a company and person works for a company. So, to resolve the ambiguity you must name the
association.
Association Direction
Associations are bidirectional. When the association is established between two classes we can travel in both
directions. The direction of traversing depends on the name of the association. Like, in the figure above, the
association name between the two classes person and stock be Worksfor. So, we navigate as a person works
for a company i.e. this association connects a person to a company.
If we name the association as Employs then we will navigate as a company employs a person i.e. this
association connects a company to a Person. It is optional while modelling but if applied it prevents confusion
Association End Names
Associated end names allotted to the ends of the association, ease in traversing the associations. Let us take
the above example of two classes person and company and their participation in the association ‘Worksfor’.
Now if we name the association ends i.e. the association end at the person side would be named ‘employee’
and the association end at the company side would be ‘employer’. It eases traversing the association.
Properties of Association and Name
Multiplicity is defined as the number of occurrences of one class that is associated with the single occurrence
of its associated class. Accordingly, the multiplicity defines the number of associated objects of the same
classes in the model. The figure below shows the many-to-many multiplicity
Qualified Association
As we have discussed above there can be multiple associations between the classes, the qualified association
helps in avoiding the confusion about the object with ‘many’, association end. The qualified association
presents an attribute named qualifier that disambiguates the association ends of the object.
The qualifier can be defined for one-to-one and many-to-many association. A qualified association adds more
information to the class model. For example, a bank has several accounts and each account has a unique
identity due to the account number. So, here the account number act as the qualifier.
Association Class
A class object is defined with the attributes of the class. Similarly, the links of an association can be described
with the attributes. This representation is called an association class. The way classes have attributes and
operation, the association class also has attributes and operations.
Association Class
The instances or the occurrences of the association class retrieve its identity from the instances of the
constituent classes. You can identify the association classes by identifying adverbs in the problem statements.