24
Presentation Of Software engineering Topic : Cohesion & Coupling Jagnesh Chawla([email protected] m)

Cohesion & Coupling

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Cohesion & Coupling

Jagnesh Chawla([email protected])

Presentation Of

Software engineering

Topic : Cohesion & Coupling

Page 2: Cohesion & Coupling

Jagnesh Chawla([email protected])

Contents :Coupling Highly Coupled Loosely Coupled Uncoupled Types Of Coupling CohesionTypes Of Cohesion

Page 3: Cohesion & Coupling

Jagnesh Chawla([email protected])

Coupling Coupling is measure of the

independence of components. Coupling is related to cohesion.It is an indication the strength of

inter connections between the components in a design .

Page 4: Cohesion & Coupling

Jagnesh Chawla([email protected])

Highly coupled

These types of systems have interconnections , with program units dependent on each other.

Page 5: Cohesion & Coupling

Jagnesh Chawla([email protected])

Highly coupled:

Page 6: Cohesion & Coupling

Jagnesh Chawla([email protected])

Loosely coupled

Loosely coupled systems are made up of components which are independent or almost independent.

In this less dependences are available.

Page 7: Cohesion & Coupling

Jagnesh Chawla([email protected])

Loosely coupled:

Page 8: Cohesion & Coupling

Jagnesh Chawla([email protected])

Uncoupled

Uncoupled components have interconnections at all.

No Dependencies

Page 9: Cohesion & Coupling

Jagnesh Chawla([email protected])

Uncoupled:

Page 10: Cohesion & Coupling

Jagnesh Chawla([email protected])

The range of coupling measures:

Content

coupling

Common

coupling

Control

coupling

Stamp coupling

Data coupling

Uncoupled

Low

Loose

High coupling

Page 11: Cohesion & Coupling

Jagnesh Chawla([email protected])

Content coupling:When one component actually

modifies another .Then the modified component is

completely dependent on the modifying one.

Page 12: Cohesion & Coupling

Jagnesh Chawla([email protected])

Page 13: Cohesion & Coupling

Jagnesh Chawla([email protected])

Common coupling:We can reduce the amount of

coupling somewhat by organizing our design so that data are accessible from a common data store.

ComponentX

Change V1

To zero

ComponentY

Increment V1

ComponentZ

V =V2+A

Global:A1A2A3Variables:V1V2

T T

Page 14: Cohesion & Coupling

Jagnesh Chawla([email protected])

Control coupling:When one component passes

parameters to control the activity of another component.

We say that there is control coupling between the two.

Page 15: Cohesion & Coupling

Jagnesh Chawla([email protected])

Stamp coupling:

When data structure is used to pass information from one component to another.

Page 16: Cohesion & Coupling

Jagnesh Chawla([email protected])

Data coupling:

If only data are passed, the components are connected by data coupling.

Page 17: Cohesion & Coupling

Jagnesh Chawla([email protected])

Cohesion:

The cohesion of a component is a measure of the closeness of the relationship between its components.

Page 18: Cohesion & Coupling

Jagnesh Chawla([email protected])

Coincidental:

The worst degree of cohesion, coincidental is found in a component whose parts are unrelated to one another.

Page 19: Cohesion & Coupling

Jagnesh Chawla([email protected])

Logical cohesion:

It is the next higher level of cohesion , where several logically related functions or data elements are placed in same component.

Page 20: Cohesion & Coupling

Jagnesh Chawla([email protected])

Temporal cohesion:

Sometime a component is used to initialize a system or a set variables.

Such a component performs several functions in sequence ,but the functions are related by the timing involved, so its cohesion is temporal.

Page 21: Cohesion & Coupling

Jagnesh Chawla([email protected])

Procedurally cohesion:

When function are grouped together in a component just to ensure this order the component is procedurally cohesive.

Page 22: Cohesion & Coupling

Jagnesh Chawla([email protected])

Communicationally:

Communicationally cohesion often destroys the modularity and functional independence of the design.

Page 23: Cohesion & Coupling

Jagnesh Chawla([email protected])

Sequential cohesion:

If the output from one part of a component is input to the next part the component has sequential cohesion.

Page 24: Cohesion & Coupling

Jagnesh Chawla([email protected])

Thank you ……