nerdexam
iSQI

CTFL_SYLL_4.0 · Question #204

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 correct answer is C. The requirements are not correct because the partitions are overlapping. Equivalence partitioning involves dividing input data into partitions that are treated the same by the system under test. The given specifications create overlapping partitions: For n<0n < 0n<0, an error message "Value out of range" is issued. For 0<n<1000 < n < 1000<n<100, the…

Test Analysis and Design

Question

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?

Options

  • AThere are 3 partitions - one for negative numbers, one for numbers up to 100 and the last one
  • BThe equivalence partitions cannot be determined for this question because the error message
  • CThe requirements are not correct because the partitions are overlapping
  • DThe equivalence partitions cannot be determined for this question because factorial of

How the community answered

(32 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    69% (22)
  • D
    19% (6)

Explanation

Equivalence partitioning involves dividing input data into partitions that are treated the same by the system under test. The given specifications create overlapping partitions: For n<0n < 0n<0, an error message "Value out of range" is issued. For 0<n<1000 < n < 1000<n<100, the factorial is calculated. For 100<n<200100 < n < 200100<n<200, the same error message "Value out of range" is issued. However, the range between 0 and 100 is exclusive of 0 and 100, meaning that the partitions overlap and create ambiguity for the boundary values. Thus, the correct statement is that the requirements are not correct because the partitions are overlapping.

Topics

#equivalence partitioning#partition boundaries#requirements analysis#test design

Community Discussion

No community discussion yet for this question.

Full CTFL_SYLL_4.0 Practice