The GATE Grind

GATE 2010 CS (CS1) – Question 31

Software Engineering · Modular Software Design · 1 mark · Multiple choice

Modules A and B each have cyclomatic complexity ten. They are sequentially integrated as shown. What is the combined complexity?

Diagram for GATE 2010 CS (CS1) question 31
  1. 19
  2. 21
  3. 20
  4. 10

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) 19

Explanation

Cyclomatic complexity counts independent paths as decisions plus one for a connected control-flow graph. Each module contributes nine decisions. Sequential composition therefore has 9+9+1=19, A, equivalently M(A)+M(B)−1.

More Modular Software Design questions

All Modular Software Design questions →