A local department store is having a BoGoHo (Buy One, Get One Half Off) sale. The store

Question:

A local department store is having a BoGoHo (Buy One, Get One Half Off) sale. The store manager wants a program that allows the salesclerk to enter the prices of two items. The program should calculate and display the total amount the customer owes. The half-off should always be taken on the item having the lowest price. For example, if the items cost $24.99 and $10, the half-off would be taken on the $10 item. If both prices are the same, take the half-off on the second item. 

a. Create an IPO chart for the problem, and then desk-check the algorithm twice. For the first desk-check, use 24.99 and 10 as the prices. For the second desk-check, use 11.50 and 30.99. 

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 Introductory12 Project, and save it in the Cpp8\Chap05 folder. Enter your C++ instructions into a source file named Introductory12.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. 


IPO chart information C++ instructions Input discount rate (10%) shipping rate 1 (0.99) shipping rate 2 (4.99) amount owed member status (Y or N) const double DISCOUNT RATE = 0.1; const double SHIP_CHG1 = 0.99; const double SHIP CHG2 - 4.99; double amtOwed = 0.0; char member = '; Processing

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: