0% found this document useful (1 vote)
537 views12 pages

Link and Association Concepts

Link represents the relationship between objects, while association represents the relationship between classes. An association is a group of links between objects of the same classes. For example, the association between a Person class and a Company class can be modeled as people owning stock in companies through links. Associations have properties like names, directions, multiplicity, and qualified associations that provide more information about the relationships between classes. Association classes add attributes and operations to the links between classes.

Uploaded by

Anjali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
537 views12 pages

Link and Association Concepts

Link represents the relationship between objects, while association represents the relationship between classes. An association is a group of links between objects of the same classes. For example, the association between a Person class and a Company class can be modeled as people owning stock in companies through links. Associations have properties like names, directions, multiplicity, and qualified associations that provide more information about the relationships between classes. Association classes add attributes and operations to the links between classes.

Uploaded by

Anjali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

LINK AND ASSOCIATION

CONCEPTS

SUBMITTED BY: ANJALI PRASAD GUIDED BY: PROF.PRAJAKTA SHIRKE MAM


PRN 180105121003
FINAL YEAR BTECH CTIS
Link and Association
Link and association in UML represent the relation between objects and classes. Link is used to establish the
relation between the objects in the object diagram. Association is used to represent the relation between the
classes.

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

1. Definition of Link and Association


2. Association End Names
3. Association Class
4. Key Takeaways
Definition of Link and Association
Link defines the relationship between two or more objects and a link is considered as an instance of an
association. This means an association is a group of links that relates objects from the same classes. This can
be easily understood with the help of an example.

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.

You might also like