0% found this document useful (0 votes)
29 views8 pages

Coupling

Coupling refers to the interdependence between software modules, with a higher degree of coupling indicating a closer interaction. There are several classes of coupling from loose to tight: data coupling involves passing basic data between modules; stamp coupling uses composite data structures; control coupling uses one module to direct the execution flow of another; common coupling shares global data between modules; and content coupling shares code between modules. The degree of coupling strength increases from data to content coupling.

Uploaded by

Nakul Bhar
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)
29 views8 pages

Coupling

Coupling refers to the interdependence between software modules, with a higher degree of coupling indicating a closer interaction. There are several classes of coupling from loose to tight: data coupling involves passing basic data between modules; stamp coupling uses composite data structures; control coupling uses one module to direct the execution flow of another; common coupling shares global data between modules; and content coupling shares code between modules. The degree of coupling strength increases from data to content coupling.

Uploaded by

Nakul Bhar
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/ 8

Coupling

Coupling indicates:
how closely two modules interact
or how interdependent they are.

The degree of coupling between


two modules depends on their
interface complexity.
Classes of coupling

data
stamp
control Degree of
coupling
common
content
Data coupling
Two modules are data coupled,
if they communicate by an
elementary data item that is
passed as a parameter between
the two, eg an integer, a float,
character etc.
Stamp coupling
Two modules are stamp coupled,

if they communicate via a


composite data item:
such as a record in PASCAL
or a structure in C.
Control coupling
It exists between two modules.
If Data from one module is used
to direct order of instruction
execution in another.
Example of control coupling:
a flag set in one module and tested
in another module.
Common Coupling

Two modules are common coupled, if they


share some global data items.
Content coupling
Content coupling exists between two
modules:
if they share code,

e.g, jump from one module into the


code of another module.

The degree of coupling increases


from data coupling to content coupling.

You might also like