Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions