Question: [Verification and Validation] Suppose that you are asked to test a program which is supposed to calculate the shipping cost from the given weight of

[Verification and Validation]

Suppose that you are asked to test a program which is supposed to calculate the shipping cost from the given weight of a package according to the formula

[Verification and Validation] Suppose that you are asked to test a program

where the handling fee and the shipping rate depend on the package weight as shown in the following table:

Weight (Kg) Handling Fee (Baht) Shipping Rate (Baht/Kg)
0.01 1.00 5 20
1.01 3.00 10 15
3.01 10.00 25 10
10.01 30.00 50 7.50
30.01 200.00 95 6
200.01 1000.00 1095 1

The program should output an error message when the input weight is more than 1000 Kg or less than 0.01 Kg.

Explain how you would design a test suite for testing this program. Give an example of a test suite from your test design.

Note: By a test suite, we mean a set of test cases. For this program, you may describe a test case as a pair (w,p) where w is a weight and p is the expected total cost for shipping a package of weight w. To save time, when describing a test case, you may leave the expected total cost blank, e.g. (25,__) or (99.99,__).

Total Cost = Handling Fee + Shipping Rate x Weight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!