Coupling
The Coupling is a measure of interconnection between modules in a program structure. Like cohesion coupling may be presented on a spectrum as shown in figure 19.2. The Coupling depends on the interface complexity among modules, the point at which entrance or reference is made to a module and what data pass across the interface.
In the software design we endeavor for lowest possible coupling. Easy connectivity between modules results in software which is easier to understand and less prone to a ripple effect caused when errors occur at one location and propagate by a system.
In the Figure gives examples of various kind of module coupling. Modules and are subordinate to various modules. Each is unrelated and thus no direct coupling occurs. The Module c is subordinate to module A accessed through a conventional argument list by that data are passed. Longley as a simple argument list is present example for simple data are passed a one-to-one correspondence of items exists; short coupling data coupling on the spectrum is exhibited in this portion of structure. A variation of data coupling is called stamp coupling is found when a portion of a data structure rather than simple arguments is passed through a module interfaces. This situation will occurs between modules b and a.
At moderate stages coupling is characterized through passage of control among modules. The Control coupling is very general is most software designs and where a control flag is passed among modules d and e.