adplus-dvertising
frame-decoration

Question

What is the main problem associated with using the number of lines of code as a complexity metric?

a.

It makes it hard to compare programs written in different languages

b.

Some lines are more complex than others

c.

Different programmers write verbose programs

d.

All of the above

Posted under Software Engineering

Answer: (d).All of the above Explanation:There are serious objections to the direct use of the number of lines of code as a complexity metric. Some programmers write more verbose programs than others. We should at least normalize the counting to counteract these effects and be able to compare different pieces of software. This can be achieved by using a prettyprinter, a piece of software that reproduces programs in a given language in a uniform way. A second objection is that this technique makes it hard to compare programs written in different languages. If the same problem is solved in different languages, the results may differ considerably in length.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the main problem associated with using the number of lines of code as a complexity metric?

Similar Questions

Discover Related MCQs

Q. What does Halstead's method, also known as 'software science', use to overcome the problems associated with metrics based on a direct count of lines of code?

Q. Why is the number seven used as a limit for the number of elements per module?

Q. What is the main drawback of using the number of lines of code as a complexity metric?

Q. What is Halstead's work known for?

Q. What is the second class of intra-modular complexity metrics based on?

Q. What is the complexity metric based on the use of data structures concerned with?

Q. What is the best-known complexity metric from the class of structure-based complexity metrics?

Q. What does McCabe base his complexity metric on?

Q. What is the formula for McCabe's cyclomatic complexity?

Q. What does the cyclomatic complexity of a program depict?

Q. What is the suggested limit of cyclomatic complexity by McCabe?

Q. What is the purpose of McCabe's cyclomatic complexity metric during testing?

Q. What do complexity metrics like those of Halstead and McCabe measure?

Q. What is the purpose of complexity metrics like McCabe's, Halstead's and others?

Q. What is the problem with the known complexity metrics?

Q. What is the 'representation condition' In terms of measurement theory?

Q. Can a higher value of complexity metric necessarily mean that a program is more complex?

Q. What is the recommendation for the use of complexity metrics?

Q. What do validations of software science and cyclomatic complexity indicate?

Q. Why is the length of a program (number of lines of code) often used as an indicator of complexity?