ITPEC FE Subject A April 2025 Question 37

Source exam: ITPEC FE Subject A April 2025Topic: Software Development

ITPEC FE Subject A April 2025 — Question 37 of 60

Multiple-Condition Coverage — add test cases so every combination of individual conditions is tested.

Condition: A > 6 or B = 0 has two sub-conditions → 4 combinations needed:

  • A > 6 = T/F
  • B = 0 = T/F

Existing test cases (branch coverage):
- (A=4, B=1) → A>6: F, B=0: F

- (A=5, B=0) → A>6: F, B=0: T

Missing combinations: T/F and T/T

Check each option (existing + added):
- (a) adds (3,0) and (7,2) → F/T + T/F → still missing T/T

- (b) adds (3,2) and (8,0) → F/F + T/T → still missing T/F

- (c) adds (4,0) and (8,0) → F/T + T/T → still missing T/F

- (d) adds (7,0) and (8,2) → T/T + T/F → all 4 covered ✓

Answer: d)

Key rule: For multiple-condition coverage with N sub-conditions, enumerate all 2^N truth value combinations and ensure each is covered by at least one test case.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.