Link and association in Java

4,426 views 17 slides Sep 17, 2017
Slide 1
Slide 1 of 17
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17

About This Presentation

Link And Association in java


Slide Content

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

Branch :: Information Technology Semester :: 5 th No. NAME Enrollment No. 1 Parekh Bhargav G. 151240116023 2 Patel Kevin R. 151240116040 3 Patel Ronak A. 151240116049

Topic :: Link and Association

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

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).

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.

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

Types of links : 1.One to one links 2.one to many and many to one links 3. Many to Many

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.

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

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)

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.

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

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.

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.

Associations Notations Directed Association *

Thank You