Software coupling involves dependencies among pieces of software called…
2018
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 parts of it
R : Content coupling occurs when one module modifies or relies on the internal working of another module
Choose the correct answer from the code given below :
𝐶𝑜𝑑𝑒:
- A.
P and Q only
- B.
P and R only
- C.
Q and R only
- D.
All of P, Q and R
Attempted by 104 students.
Show answer & explanation
Correct answer: B
Answer: P and R only.
Definitions and reasoning:
P — Common coupling: True. This occurs when two or more modules share the same global data or common data area.
Q — Incorrect as stated. The description given (sharing a composite data structure and using only parts of it) matches stamp (data-structured) coupling, not control coupling. Control coupling occurs when one module passes control information (for example, flags or control parameters) to another module to direct its behavior.
R — Content coupling: True. This happens when one module modifies or depends on the internal workings of another module (the highest and most undesirable form of coupling).
Therefore, the correct statements are P and R only.
A video solution is available for this question — log in and enroll to watch it.