IPA FE Subject A sample Question 39
A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問39, translated into English. ITPEC is based on the same exams.
Same question on ITPEC: Spr 2021 Q48
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 the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.