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

Discussion

Vocabulary of a program is defined as :

  • A.\(n = n_{1} + n_{2}\)
  • B.\(n = n_{1} - n_{2}\)
  • C.\(n = n_{1} \times n_{2}\)
  • D.\(n = n_{1} / n_{2}\)

Answer: A

The vocabulary is \(n = n_1 + n_2\).

In Halstead's software science, \(n_1\) is the number of distinct operators and \(n_2\) the number of distinct operands in a program. The vocabulary is the total number of distinct tokens, their sum.

The related measures are program length \(N = N_1 + N_2\), the total count of operator and operand occurrences, and volume \(V = N \log_2 n\). Differences, products and ratios of \(n_1\) and \(n_2\) are not Halstead measures, so the other options are wrong.

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

Post your comment

Please log in or register to post a comment.