Coupling and Cohesion 10 MCQ

MCQs on Coupling and Cohesion with answers and explanations, suitable for UGC NET, ISRO, and Assistant Professor exams:

1. Which of the following is the most desirable combination in modular programming?
a) High coupling, high cohesion
b) Low coupling, low cohesion
c) High cohesion, low coupling
d) Low cohesion, high coupling
Answer: c) High cohesion, low coupling
Explanation: This combination ensures modules are well-structured and independent, promoting maintainability and reusability.

2. If two modules share global data, what kind of coupling is it?
a) Content coupling
b) Control coupling
c) Common coupling
d) Data coupling
Answer: c) Common coupling
Explanation: Common coupling occurs when modules share global variables.

3. Which type of cohesion is considered the strongest or best?
a) Coincidental cohesion
b) Temporal cohesion
c) Functional cohesion
d) Logical cohesion
Answer: c) Functional cohesion
Explanation: Functional cohesion means all parts of a module work together to achieve a single function, which is ideal.

4. What kind of coupling exists when one module passes control information (like flags) to another?
a) Content coupling
b) Control coupling
c) Stamp coupling
d) Common coupling
Answer: b) Control coupling
Explanation: Control coupling occurs when one module controls the behavior of another by passing control information.

5. Which type of cohesion is the least desirable?
a) Functional cohesion
b) Sequential cohesion
c) Coincidental cohesion
d) Communicational cohesion
Answer: c) Coincidental cohesion
Explanation: Coincidental cohesion occurs when the elements of a module have no meaningful relationship, making it the worst form.

6. What is the main disadvantage of high coupling?
a) Code becomes more readable
b) Modules are independent
c) Changes in one module affect others
d) Reusability increases
Answer: c) Changes in one module affect others
Explanation: High coupling reduces modular independence, making maintenance and testing more difficult.

7. Stamp coupling refers to:
a) Two modules sharing global data
b) One module modifying the internal structure of another
c) Modules sharing only the necessary data structure
d) Modules sharing only control flags
Answer: c) Modules sharing only the necessary data structure
Explanation: In stamp coupling, modules share composite data structures, but not all the data is used.

8. A module that performs several unrelated actions has:
a) Coincidental cohesion
b) Functional cohesion
c) Logical cohesion
d) Sequential cohesion
Answer: a) Coincidental cohesion
Explanation: Coincidental cohesion means unrelated functions are grouped in a single module.

Comments