ISTQB Certified Tester Foundation Level v4.0 — Question 17
Consider a program that computes the factorial of a number (n). From the specifications you know that:
• If n < 0, a message "Value out of range" must be issued
• If 0 ≤ n ≤ 100, the program calculates the factorial and returns the number
• If 100 ≤ n ≤ 200 message "Value out of range" must be issued
Which of the following statements about the equivalence partitions is CORRECT?
Answer options
- A. There are 3 partitions - one for negative numbers, one for numbers up to 100 and the last one for numbers up to 200
- B. The requirements are not correct because the partitions are overlapping
- C. The equivalence partitions cannot be determined for this question because the error message for two partitions is exactly same
- D. The equivalence partitions cannot be determined for this question because factorial of numbers close to 200 will be very large
Correct answer: B
Explanation
The correct answer is B because the defined partitions for the ranges overlap, particularly between 100 and 200, which leads to ambiguity in determining valid input ranges. Options A, C, and D are incorrect as they either misinterpret the overlapping issue, incorrectly state that the error messages prevent partitioning, or focus on the size of factorials instead of partition validity.