0% found this document useful (0 votes)
5K views24 pages

Links and Associations

This document discusses links and associations in UML modeling. It defines links as the logical and physical connections between objects, while associations describe relationships between classes of objects. The key aspects of associations covered include binary and self associations, multiplicity, association ends, ordering, association classes, and qualified associations. Examples are provided to illustrate different association types like one-to-one, many-to-many, and many-to-one relationships.

Uploaded by

SATNAM Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5K views24 pages

Links and Associations

This document discusses links and associations in UML modeling. It defines links as the logical and physical connections between objects, while associations describe relationships between classes of objects. The key aspects of associations covered include binary and self associations, multiplicity, association ends, ordering, association classes, and qualified associations. Examples are provided to illustrate different association types like one-to-one, many-to-many, and many-to-one relationships.

Uploaded by

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

LINKS AND

ASSOCIATIONS
Submitted to:
Neha Dogra

Submitted by:
Kamna Bansal
17071201
1. Links
• Link Attribute
2. Assocation
• Binary Association
• Multiplicity
• Association end names
• Odering
• Association Class
• Qualified Association
LINKS
•The logical and physical connection between objects is known as links.
•Through a link, one object may invoke the method or navigate through
another object.
•A link depicts the relationship between two or more objects.
•A link is an instance of an association.
Example:-

Alice BITS
(object 1) Owns stock (object 2)
example
Link attribute
A link attribute is a property of the links in an association.

file Accessible by
user
Association
•An association is a description of a group of links with common structure
and common semantics.
•All links in an association connect objects from the same classes.
•Association are inherently bidirectional.
•Associations are often implemented in programming languages as pointer
from one object to another.
Association
Binary association
A binary association is drawn as a solid path connecting two classes or both ends
may be connected to the same class.

company person

Self Associated
Involving class person User
Association: multiplicity
•Multiplicity specifies the number of instances of one class that may relate to a
single instance of an associated class.
•It constrains the number of related objects.
•It depend on assumptions and how you define the boundaries of problem.
•UML diagrams explicitly list multiplicity at the end of association lines.

* OwnsStock *
Person name Company name

multiplicity
•Intervals are used to express multiplicity:-

One to One:-
Company 1 1 BoardOfDirector

Many to Many:-

Secretary * 1..* Manager


Many to One:-

ATM * 1 Bank
Don’t confuse
Multiplicity :-
It is a constraint on the size of collection .
Cardinality :-
It is the count of elements that are actually in a collection.
Another Example :-
NOTE
• A multiplicity of “many” specifies that an object may be associated with
multiple objects. However, for each association there is at most one link
between given pair of objects.
Association ends name
•Associations have ends.They are called “Association ends”
employee employer
Person Company
worksfor

• Association end names are necessary for associations between objects of the
same class

• But association end names are useful for traversing associations.


•Use of end names is optional.
NOTE:- we should properly use association end names and not introduce a
separate class for each reference
2 *
parent Child Wrong model

Person
parent

Child * Correct model


Ordering
•On a many association end,some times it is required that objects have an
excplicit order.
•The ordering in an inherent part of the association.
•Example: A workstation screen contain a number of overlapping
windows.Each window on a screen occurs at most once.The windows have an
explicit order so only the topmost window is visible

1 {ordered}
*
Workstation Window
Association class
•UML offers the ability to describe links of association with attributes .
• Association classes often occur in many-to-one and many-to-many
associations where the association itself has attributes..
•Like a class it has attributes and operation and participate in association.
Example
For example, a class called Student represents a student and has an association with
a class called Course, which represents an educational course. The Student class can
enroll in a course. An association class called Enrollment further defines the
relationship between the Student and Course classes by providing section, grade,
and semester information related to the association relationship.

Association class
Another Examples
Qualified association
•A qualified association related two classes and a qualifier
•One to many and many to many association may be qualified.
•The qualifier is a special attribute that reduces the effective multiplicity
of an association.
Qualifier
passenger
Flight Seat Passengers
https://eduladder.com/viewquestions/296/What-are-links-and-association-write-and-explain-
UML-notation-for-links-and-association-with-example

https://techdifferences.com/difference-between-link-and-association.html

https://www.slideshare.net/ManojReddy1/unit-1-modelling-concepts-class-modeling

Object Oriented Modeling And Design With UML , 2nd ED. By Michael Blaha and Rumbaugh

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy