Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which metric best reflects software maintainability ?

  • A.Cyclomatic complexity
  • B.Halstead volume
  • C.Lines of code
  • D.Function points

Answer: A

The key's answer is Cyclomatic complexity.

McCabe's cyclomatic complexity counts the independent paths through a module's control flow. High values mean code that is harder to understand, test and change safely, so it is the metric most directly used to judge maintainability, and modules above about 10 are commonly flagged for refactoring.

Halstead volume measures the size of the program's vocabulary of operators and operands, lines of code measure size only, and function points measure delivered functionality, which is used for estimating effort. Halstead volume and lines of code also feed composite indexes of maintainability, but on their own they say less about how hard code is to change.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.