Discount at Co-Op Test Data Exercise

A local co-op is running a special sale. Discounts are offered based on membership status and the total amount of a purchase. Determine discounts are amount based on the following.

Members receive a 10% discount on the entire purchase amount plus an additional 5% discount on the amount over $100.

Nonmembers do not receive a discount on purchases less than $100 but receive a 10% discount on the full amount for purchases that total >= $100.

Hint: Each set of data must have a membership status (Member or Nonmember) and a purchase amount. There will be a minimum of 6 sets of input plus invalid input to test validation.

Many values can be used. What is important is that you test the pivotal value 100 for both member and nonmember and that you test values less than 100 and values greater than 100 for members and nonmembers plus values to test the data validation logic

 

membership status

purchase amount

Discount Amount

Member

101 (>100)

        10.15

Member

100 (=100)

        10.00

Member

 99 (< 100)

         9.90

nonmember

101  (>100)

        10.10

NonMember

 100 (=100)

        10.00

NonMember

 99 (<100)

        0.00

Member

Nonnumeric

Error and Blank

NonMember

Nonnumeric

Error and Blank

 

 All years that are evenly divisible by 400 are leap years. All years that are evenly divisible by 4 and not evenly divisible by 100 are also leap years. All other years are not leap years. 1996, 2000, and 2004 are all leap years but 1998, 1999, and 2100, and not leap years.

 Are the following years leap years or not? Are all the scenarios covered in this set of test data?

  

Year

Leap Year?

1997

 NO  (not evenly divisible by 4)

1900

 No  (evenly divisible by 100 but not evenly divisible by 400

1600

 Yes (evenly divisible by 400)

2002

 NO (not evenly divisible by 4)

1992

 Yes (evenly divisible by 4 and not evenly divisible by 100)

1904

 Yes (evenly divisible by 4 and not evenly divisible by 100)