Back to the 2026 paper

Module 3: Software Design & Metrics

20262m

Halstead's software science primarily uses counts of

(i) Modules and classes
(ii) Operators and operands
(iii) Test cases and defects
(iv) Inputs and outputs only

Worked SolutionAI Assisted

Solution

Correct Answer: (ii) Operators and operands

Explanation

Halstead's software science measures a program using counts of its operators and operands:

  • n1 = distinct operators, n2 = distinct operands
  • N1 = total operators, N2 = total operands

From these:

  • Vocabulary n = n1 + n2
  • Length N = N1 + N2
  • Volume V = N × log2(n)

Why other options are incorrect:

  • (i) Modules and classes - used in design metrics, not Halstead.
  • (iii) Test cases and defects - testing/quality metrics.
  • (iv) Inputs and outputs only - that is closer to Function Point Analysis.

Answer: (ii) Operators and operands

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.