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?
- A. 4
- B. 2.5
- C. 10
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- David Parnas's information-hiding principle says how a system should be divided into modules. Which statement captures it?
- Match each system with its architectural style. P: a compiler with lexer → parser → optimiser → code generator. Q: a typical 3-tier web…
- In MVVM, unlike MVC and MVP, how does the view usually get updated when data changes?
- A company organised as separate frontend, backend and database teams keeps producing a three-tier system even when microservices were…
- A public JSON API is used by many clients that ignore unknown fields. How many of these changes are breaking: (1) adding a new optional…
- In npm's semantic-version ranges, which versions does ^1.4.2 allow, and which does ^0.4.2 allow?