Coupling (computer Programming) - Module Coupling

Module Coupling

Coupling in Software Engineering describes a version of metrics associated with this concept.

For data and control flow coupling:

  • di: number of input data parameters
  • ci: number of input control parameters
  • do: number of output data parameters
  • co: number of output control parameters

For global coupling:

  • gd: number of global variables used as data
  • gc: number of global variables used as control

For environmental coupling:

  • w: number of modules called (fan-out)
  • r: number of modules calling the module under consideration (fan-in)

Coupling(C) makes the value larger the more coupled the module is. This number ranges from approximately 0.67 (low coupling) to 1.0 (highly coupled)

For example, if a module has only a single input and output data parameter

If a module has 5 input and output data parameters, an equal number of control parameters, and accesses 10 items of global data, with a fan-in of 3 and a fan-out of 4,

Read more about this topic:  Coupling (computer Programming)

Famous quotes containing the word coupling:

    The time of the seasons and the constellations
    The time of milking and the time of harvest
    The time of the coupling of man and woman
    And that of beasts. Feet rising and falling.
    Eating and drinking. Dung and death.
    —T.S. (Thomas Stearns)