166k views
1 vote
Purchase discount is 0% for up to 500$, 5% is added for each additional 500$ up to 2000$ , and 25% is applied for above 2000 EGP. Which test inputs in EGP would be selected for equivalence partitions?

A. -250, 700, 1400, 1800, 4000
B. 250, 1000, 3000
C. -100, 250, 650, 1300, 1700, 2900
D. 200, 720, 1600, 1800, 2100

User MS Ibrahim
by
8.4k points

1 Answer

4 votes

Final answer:

Option A (-250, 700, 1400, 1800, 4000) correctly represents the equivalence partitions for the given discount policy, which are values for an invalid input, no discount, incremental discounts at each additional 500 EGP, and a flat 25% discount above 2000 EGP.

Step-by-step explanation:

The question involves determining test inputs for equivalence partitions based on a discount policy. For this scenario, test inputs should be chosen to represent different ranges of the policy: no discount, incremental discounts, and the maximum discount. According to the discount rule provided, the first partition is from 0 to 500 EGP (no discount), the second partition is from 501 to 2000 EGP (incremental discounts at each additional 500 EGP), and the third partition is for amounts above 2000 EGP (flat 25% discount). Therefore, the test inputs for equivalence partitions could be:

  • A value less than 0 EGP to represent an invalid input (e.g., -250 EGP)
  • A value within the range of 0 to 500 EGP to represent no discount (e.g., 250 EGP)
  • A value slightly above 500 EGP to represent the first incremental discount (e.g., 700 EGP)
  • Additional values at increments above 500 EGP (e.g., 1400 EGP and 1800 EGP)
  • A value well above 2000 EGP to represent the 25% discount (e.g., 4000 EGP)

If we compare the given options, option A (-250, 700, 1400, 1800, 4000) best represents these equivalence partitions.

User Informat
by
8.3k points