ITPEC FE Morning April 2021 Question 48
Which of the following is the weakest module coupling?
Explanation
Passing only the required data items as arguments — this is data coupling, the weakest kind of coupling between modules.
Coupling measures how much modules depend on each other. From weakest (best) to strongest:
- •Data coupling: only the needed data items are passed as arguments
- •Stamp coupling: a whole data structure is passed although only part of it is used
- •Control coupling: a flag is passed that decides the called module's logic
- •External coupling: modules share an externally defined data item or format
- •Common coupling: modules share data in a global area
- •Content coupling: one module refers directly to the inside of another
Answer (c)
Why not others:
- •(a) — cramming many functions into one module is not a kind of coupling at all; it lowers cohesion and makes the module hard to maintain and reuse
- •(b) — passing arguments that control the other module's logic is control coupling: the caller must know how the callee works inside
- •(d) — sharing data through a global area is common coupling: any module can change the data, so a change affects every module that uses it
Key rule: Aim for low coupling and high cohesion: pass modules only what they need, and keep each module to one well-defined function.
System Development Technology · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.