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](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66d5f6bb9f06f_36366d5f6bb50509.jpg)
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
Get step-by-step solutions from verified subject matter experts
