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

Software coupling involves dependencies among pieces of software called modules. Which of the following are correct statements with respect to module coupling?
P: Common Coupling occurs when two modules share the same global data.
Q: Control Coupling occurs when modules share a composite data structure and use only part of it.
R: Content Coupling occurs when one module modifies or relies on the internal working of another module.

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

Show answer & explanation

Correct answer: B. P and R only

Explanation

The correct choice is P and R only. P is the standard definition of common coupling: two or more modules read and write the same global data area. R is the definition of content coupling, the worst form, where one module reaches into another module's internals or alters its local data. Q is wrong because sharing a composite data structure and using only part of it is stamp coupling, not control coupling; control coupling is when one module passes a flag or command that dictates the logic the other module executes.

More Programming Languages and Computer Graphics questions