Problem

Tea Time Company wants a program that allows a clerk to enter the number of pounds of te...

Tea Time Company wants a program that allows a clerk to enter the number of pounds of tea ordered, the price per pound, and whether the customer should be charged a $15 shipping fee. The program should calculate and display the total amount the customer owes. Use an i nt variable for the number of pounds, a double variable for the price per pound, and a char variable for the shipping information.

a. Create an IPO chart for the problem, and then desk-check the algorithm twice. For the first desk-check, use 10 as the number of pounds and 12.54 as the price per pound; the customer should be charged the shipping fee. For the second desk-check, use 5 as the number of pounds and 11.59 as the price; the customer should not be charged the shipping fee.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 5-37. Then code the algorithm into a program.

c. Desk-check the program using the same data used to desk-check the algorithm.

d. Enter your C++ instructions into a source file named Introductoryll.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the total amount owed in fixed-point notation with two decimal places.

e. Save and run the program. Test the program using the same data used to desk-check the program.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 5