Question: Equivalence Partitioning (a) A software program is used by a store to compute the discount it offers on the amount of purchases made by an

Equivalence Partitioning (a) A software program is used by a store to compute the discount it offers on the amount of purchases made by an individual: The purchase price input is an integer. A purchase amount is in the range of 1 up to 50 there is no discount, A purchase amount over 50 and up to 200 has a 5% discount A purchase amount of 201 and up to 500 has a 10% discount, A purchase amount of 501 and above has a 15% discount Additionally, if the customer is a member of the loyalty club they get an added discount of 20% on purchases of value 201 and greater. If the value entered for the purchase is accidentally entered as a negative number the discount value returned is -1%. The program input consists of 2 parameters: int purchases and boolean isMember. The program output is the int discount value as a percentage. Any invalid input returns a value of -1%. Considering the Black Box Software testing methods of Equivalence Partitions for this program fill in table with the input and output partitions. Then write out suitable tests ensuring to outline the partitions covered with each set of test data and highlight the error cases with an asterisk. [20 marks] Test Cases Range Input Partitions Parameter - purchases EP1 EP2 EP3 EP4 Parameter - isMember EPS EP6 Output Partitions Parameter - discount EP7 EPS EP9 EP10 EP11 EP12 *EP13 Error Case -1 Test Data Test No. Inputs Test Cases Covered Expected Outputs Purchases isMember discount 1 2 2 3 w 4 un 6 7. 7 EP13 0 False - 1
Step by Step Solution
There are 3 Steps involved in it
To fill out the equivalence partitioning table and develop the test cases we need to establish the i... View full answer
Get step-by-step solutions from verified subject matter experts
