ITPEC FE Morning April 2020 Question 48

Source exam: ITPEC FE Morning April 2020Topic: Software Development

ITPEC FE Morning April 2020 — Question 48 of 80

Multiple-Condition Coverage — add test data to cover all sub-condition combinations.

Condition: A > 6 OR B = 0 has two sub-conditions.

Multiple-condition coverage requires all 2² = 4 combinations:

#A > 6B = 0Result
1TTT
2TFT
3FTT
4FFF

Existing branch coverage data:
- (A=4, B=1) → F, F — covers #4

- (A=5, B=0) → F, T — covers #3

Missing: #1 (T, T) and #2 (T, F)

Answer (d): (A=7, B=0) → T, T and (A=8, B=2) → T, F — covers both missing combinations.

Why not others:
- (a) (3,0)→F,T and (7,2)→T,F — only adds #2, #3 already covered

- (b) (3,2)→F,F and (8,0)→T,T — only adds #1

- (c) (4,0)→F,T and (8,0)→T,T — only adds #1

Key rule: Branch coverage = all outcomes of the whole condition. Multiple-condition coverage = all T/F combinations of each individual sub-condition (2^n for n sub-conditions).

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.