Coupling is a measure of the strength of the interconnections between software…

2018

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.
Code :

  1. A.

    P and Q only

  2. B.

    P and R only

  3. C.

    Q and R only

  4. D.

    All of P, Q and R

Attempted by 179 students.

Show answer & explanation

Correct answer: C

  • Statement P (Incorrect):

    • Statement: "Common coupling occurs when one module controls the flow of another module by passing it information on what to do."

    • Correction: This is the definition of Control Coupling, not Common Coupling.

      • Control Coupling: When one module passes elements of control (like flags, function codes, or switches) to another module, effectively directing its execution logic.

      • Common Coupling: When multiple modules share the same global data (e.g., global variables or a shared memory area).

    • Verdict: False.

  • Statement Q (Considered Correct in this context):

    • Statement: "In data coupling, the complete data structure is passed from one module to another through parameters."

      • Technically, passing a composite data structure is often called Stamp Coupling, especially if the receiver only uses parts of it.

      • Data Coupling usually refers to passing elementary data items (integers, strings) via parameters.

      • However, since the mechanism here is "passing through parameters" (as opposed to global sharing), and because Statement P is definitely false, Statement Q is accepted as part of the correct answer by elimination.

    • Verdict: True.

  • Statement R (Correct):

    • Statement: "Stamp coupling occurs when modules share a composite data structure and use only parts of it."

    • Analysis: This is the precise, textbook definition of Stamp Coupling. Ideally, modules should only receive the specific variables they need (Data Coupling). If they receive a whole record/struct but only read one field, it creates an unnecessary dependency on the data structure's format.

    • Verdict: True.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor