Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mountain Coffee wants a program that allows a clerk to enter the number of pounds of coffee ordered, the price per pound, and whether the

Mountain Coffee wants a program that allows a clerk to enter the number of pounds of coffee ordered, the price per pound, and whether the customer should be charged a 3.5% sales tax. The program should calculate and display the total amount the customer owes. Use an int variable for the number of pounds, a double variable for the price per pound, and a char variable for the sales tax information.

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

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-27. Then code the algorithm into a program.

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

d. If necessary, create a new project named Introductory11 Project, and save it in the Cpp8\Chap05 folder. Enter your C++ instructions into a source file named Introductory11.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. Test the program using the same data used to desk-check the program.

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

Students also viewed these Databases questions

Question

Why are product layouts atypical in service environment?

Answered: 1 week ago

Question

Should all businesses have a competitive advantage?

Answered: 1 week ago