A ventilation controller uses the current room temperature and the fan's previous state, meaning its stored ON or OFF condition, to determine its next state. Its specification is:
Complete the expected outputs using ON or OFF. Each row is an independent test case; use the previous state supplied in that row.
Unlock full course notes by signing up
Distinguish missing, invalid, and usable measurements
An engineering program estimates material density from mass mmm in kilograms and volume VVV in cubic metres using ρ=m/V\rho=m/Vρ=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<0m<0 or V≤0V\leq0V≤0, return INVALID.
Preserve the acceptance boundary
A software specification accepts an axially loaded member when its calculated tensile stress is at or below 120.0 MPa120.0\ \text{MPa}120.0 MPa. It uses σ=F/A\sigma=F/Aσ=F/A, with force and area treated as exact inputs for this calculation. Stress is displayed to one decimal place, but acceptance must use the unrounded calculated value. For F=30.01 kNF=30.01\ \text{kN}F=30.01 kN and A=250.0 mm2A=250.0\ \text{mm}^2A=250.0 mm2, which rule and decision implement the specification correctly? Use 1 N/mm2=1 MPa1\ \text{N/mm}^2=1\ \text{MPa}1 N/mm2=1 MPa.
Specify a guarantee across operating ranges
An engineer wants software to decide whether a motor rated to provide 3.50 kW3.50\ \text{kW}3.50 kW of mechanical shaft power can drive a water pump under every specified operating condition. The flow rate is fixed at Q=0.0200 m3/sQ=0.0200\ \text{m}^3/\text{s}Q=0.0200 m3/s and the elevation rise is H=12.0 mH=12.0\ \text{m}H=12.0 m. Friction head can range from hf=0h_f=0hf=0 to 4.00 m4.00\ \text{m}4.00 m, and pump efficiency can range from η=0.650\eta=0.650η=0.650 to 0.7500.7500.750. Every combination within these ranges is admissible.
Assume steady incompressible flow and use
Size storage from sampling and capacity requirements
An engineering data logger must store measurements during a 75-minute test. It takes its first sample at t=0t=0t=0 and then samples every 0.40 s0.40\ \text{s}0.40 s. It stores samples taken strictly before the test ends; it does not sample at the ending instant.
Each record, the stored entry for one sample, occupies 18 bytes. The test produces one file with a single 2048-byte header in addition to its records. There is no compression or other file overhead.
Storage is installed in whole modules. Each module provides 32 KiB, but 25% of the total installed capacity must remain reserved and cannot hold the test file. The remaining capacity can hold the file across module boundaries without additional overhead.