Distinguish missing, invalid, and usable measurements

An engineering program estimates material density from mass mm in kilograms and volume VV in cubic metres using ρ=m/V\rho=m/V. Before calculating, it assigns exactly one status according to this specification:

  • If either measurement is missing, return MISSING without performing further checks.
  • Otherwise, if m<0m<0 or V≤0V\leq0, return INVALID.
  • Otherwise, return READY and permit the calculation.

Apply the missing-data check first. Fill each blank with MISSING, INVALID, or READY.


For m=0 kgm=0\ \text{kg} and V=0.025 m3V=0.025\ \text{m}^3, the status is .


For m=6.0 kgm=6.0\ \text{kg} and V=0 m3V=0\ \text{m}^3, the status is .


For a missing mass measurement and V=−0.003 m3V=-0.003\ \text{m}^3, the status is .

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Translating Engineering Problems into Software Solutions Questions: