CS FundamentalsHardGATE CS · product placement

A class has four methods with cyclomatic complexities 1, 3, 2 and 4. Using the CK metric Weighted Methods per Class (WMC) with cyclomatic complexity as the weight, what is WMC?

  1. A. 4
  2. B. 2.5
  3. C. 10
  4. D. 24

Correct answer: C. 10

WMC sums the weights: 1 + 3 + 2 + 4 = 10. 4 is the count of methods (WMC with unit weights) and 2.5 is the average complexity.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic