All mock tests are FREE till 31 December — register to save your progress

Coupling is a measure of the strength of the interconnections between software modules. Which of the following are correct statements with respect to module coupling?
P: Common coupling occurs when one module controls the flow of another module by passing it information on what to do.
Q: In data coupling, the complete data structure is passed from one module to another through parameters.
R: Stamp coupling occurs when modules share a composite data structure and use only parts of it.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. Q and R only

Explanation

The answer is Q and R only. P is false because passing a flag or command that tells another module what to do is control coupling; common coupling is when modules share the same global data area. R is the textbook definition of stamp coupling, where a composite record or structure is passed but the receiving module uses only some of its fields. Q is accepted as true in the sense intended by the paper, that data coupling is communication through explicit parameters rather than through globals or internals. Since P is definitely wrong and R is definitely right, options (1), (2) and (4) are all eliminated.

More Programming Languages and Computer Graphics questions