A package weighing 100 pounds or more is too large. Output message: Package is 999 lb(s). overweight. A package with volume greater than 10 cubic feet is too large. Output message: Package is 999 cu. ft. too large. Otherwise, output message: Package is within limits.
Assume correct weight input ( 1 - 999 pounds ).
Assume correct dimension input ( 1 - 10 feet ).
Assume integer input.
The program should loop while the user enters Y or y, otherwise exit the program.
Use constants to represent package limits.
Use the standard program header as shown in Assignment 2.
Complete an algorithm named Package2.txt before beginning your program.
Comment your program for readability and ease of maintenance.
Test your program thoroughly. Sample Test Data is given below.
Run Package Checker (Y/N)? Y Enter weight (lbs.) -----> 152 Enter length (ft.) ------> 1 Enter width (ft.) ------> 2 Enter height (ft.) ------> 3 Package is 53 lb(s). overweight.
Wgt L W H Expected Result ------------------------------------------------------- Test 1 152, 1, 2, 3 Package is 53 lb(s). overweight. Test 2 1, 1, 1, 1 Package is within limits. Test 3 99, 1, 1, 1 Package is within limits. Test 4 100, 1, 1, 1 Package is 1 lb(s). overweight. Test 5 1, 1, 1, 10 Package is within limits. Test 6 1, 1, 1, 11 Package is 1 cu. ft. too big. Test 7 999, 9, 10, 10 Package is 900 lb(s). overweight. Package is 890 cu. ft. too big. -------------------------------------------------------
This page maintained by bobh@hesston.edu