1. SARDAR PATEL COLLEGE OF
ENGINEERING , BAKROL-124
Applied Science & Humanities Department
Subject Name :: Object Oriented Programming
using JAVA (2150704)
Branch :: Information Technology
Guided By ::
Prof. Ronak Patel
2. Branch :: Information Technology
Semester :: 5th
No. NAME Enrollment No.
1 Parekh Bhargav G. 151240116023
2 Patel Kevin R. 151240116040
3 Patel Ronak A. 151240116049
4. LINK AND ASSOCIATION
links and association are the means for building
the relationship among the objects and classes.
Links and association , both are quite same
feature but links establishing among the objects
(instance) and association establishing among
the class.
Finally link is related to objects whereas
association is related to classes
5. LINKS
In object modeling links provides a
relationship between the objects.
These objects or instance may be same or
different in data structure and behavior.
Therefore a link is a physical or conceptual
connection between instance (or objects).
6. A link represents a connection through which
an object collaborates with other objects.
Rumbaugh has defined it as “a physical or
conceptual connection between objects”.
Through a link, one object may invoke the
methods or navigate through another object.
A link depicts the relationship between two
or more objects.
7. For example:
Works for
(Link)
Ram works for SPCE College. In this example
“works for” is the link between “Ram” and
“SPCE College”. Links are relationship among
the objects(instance).
Ram SPCE
8. TYPES OF LINKS:
1.One to one links
2.one to many and many to one links
3. Many to Many
9. ASSOCIATIONS
Association is a group of links having common
structure and common behavior. Association
depicts the relationship between objects of one or
more classes. A link can be defined as an
instance of an association.
Object modeling describes as a group of links
with common structure and common semantics.
10. All the links among the object are the forms of
association among the same classes.
The association is the relationship among classes.
1. Association
2. Association with inverse direction
3.Association between student and university
11. DEGREE OF ASSOCIATION
1. Unary association(degree of one)
2. Binary Association (degree of two)
3. Ternary Association (degree of three)
4. Quaternary Association (degree of four)
5. Higher order association (more than four)
12. 1.Unary Association: the association can be defined
on a single class. This type of association called
unary (or singular) association.
2. Binary Association: The binary association
contain the degree of two classes. The association
uses two class.
3. Ternary Association: The association which
contain the degree of three classes is called ternary
association. The ternary Association is an atomic
unit and cannot be subdivided into binary
association without losing information.
13. 4. Quaternary Association: The Quaternary
Association exists when there are four classes
associated.
5. Higher degree Association: The higher order
association are more complicated to draw ,
implement because when more than four class
need to be associated then it seems a hard task
14. CARDINALITY RATIOS OF ASSOCIATIONS
Cardinality of a binary association denotes
the number of instances participating in an
association. There are three types of
cardinality ratios, namely:
One–to–One : A single object of class A is
associated with a single object of class B.
15. One–to–Many : A single object of class A is
associated with many objects of class B.
Many–to–Many : An object of class A may
be associated with many objects of class B
and conversely an object of class B may be
associated with many objects of class A.