Question: In this exercise, you create a program for the sales manager at Computer Haven, a small business that offers motivational seminars to local companies. Figure
In this exercise, you create a program for the sales manager at Computer Haven, a small business that offers motivational seminars to local companies. Figure 7-53 shows the charge for attending a seminar. Notice that the charge per person depends on the number of people the company registers. For example, the cost for four registrants is $400; the cost for two registrants is $300. The program should allow the sales manager to enter the number of registrants for as many companies as needed. When the sales manager has finished entering the data, the program should calculate and display the total number of people registered, the total charge for those registrants, and the average charge per registrant. For example, if one company registers four people and another company registers two people, the total number of people registered is six, the total charge is $700, and the average charge per registrant is $116.67.
Figure 7-53
Number of people a company registers Charge per person ($)
1 – 3 ........................................................................ 150
4 – 9 ........................................................................ 100
10 or more ............................................................. 90
a. Create an IPO chart for the problem, and then desk-check the algorithm appropriately.
b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 7-42. 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 Advanced25 Project, and save it in the Cpp8\Chap07 folder. Enter your C++ instructions into a source file named Advanced25.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Display the average charge with two decimal places.
e. Save and then run the program. Test the program using the same data used to desk-check the program.
IPO chart information Input growth rate (5.5%) C++ instructions const double GROWTH_RATE = 0.055; double sales = 0.0; sales Processing annual inorease double annualIncrease 0.0; Output number of years (counter) sales int years = 0; declared in the Input section Algorithm 1. enter the sales 2. repeat while (sales > sales; while (sales < 150000.0) { calculate the annual increase by multiplying the sales by the growth rate annualIncrease = sales * GROWTH_RATE; add the annual increase to the sales sales +- annualIncrease; add 1 to the number of years end repeat 3. display the number of years and the sales } //end while years += 1; cout
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
Input rate 1 1 to 3 150 rate 2 4 to 9100 rate 3 10 and over90 number registered rate 1 rate 2 150 300 150 total charge 400 700 100 1050 1550 rate 3 go Processing Processing items company charge Algori... View full answer
Get step-by-step solutions from verified subject matter experts
