Question

In: Computer Science

In this exercise, you create a program for the sales manager at Computer Haven, a small...

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.
Number of people a company registers Charge per person ($)
1 – 3 150
4 – 9 100
10 or more 90
Figure 7-53
a. Create an IPO chart for the problem, and then desk-check the algorithm appropriately. and . 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.

please provide ipo chart and algorithm. thank you C++

Solutions

Expert Solution

PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU

#include <iostream>
#include <iomanip>

using namespace std;

//Main function
int main()
{
        //Variables
        int numR, totR = 0;
        double amt, totA = 0;
        double avgAmt;

        //Loop till user want to quit
        while (1)
        {
                //Reading number of registrations
                cout << "\n\n Number of people for registration(-999 to stop): ";
                cin >> numR;

                //For two decimal places
                cout << fixed << setprecision(2);

                //Validating number of registrations
                if (numR != -999)
                {
                        //Checking amount
                        if (numR >= 1 && numR <= 3)
                        {
                                //Calculating amount
                                amt = numR * 150;
                        }
                        else if (numR >= 4 && numR <= 9)
                        {
                                //Calculating amount
                                amt = numR * 100;
                        }
                        else if (numR >= 10)
                        {
                                //Calculating amount
                                amt = numR * 90;
                        }
                        else
                        {
                                amt = 0;
                        }

                        //Adding to total amount
                        totA += amt;

                        //Adding to total number of registration
                        totR += numR;

                        cout << "\n Registration amount for " << numR << " registrations: $" << amt;
                }
                else
                {
                        break;
                }
        }

        //Calculating average
        avgAmt = totA / (double)(totR);

        //Printing results
        cout << endl
             << " Total number of people registered: " << totR << endl;
        cout << endl
             << " Total charge: $" << totA << endl;
        cout << endl
             << " Average charge: $" << avgAmt << endl;

        return 0;
}

Related Solutions

The manager of Fish Haven wants a program that displays the number of gallons of water...
The manager of Fish Haven wants a program that displays the number of gallons of water a rectangular aquarium holds, given the aquarium’s length, width, and height measurements in inches. (Hint: There are 231 cubic inches in a gallon.)a.Using the chart shown earlier in Figure 4-12 as a guide, enter the input, processing, and output items, as well as the algorithm, in the first column. b.Desk-check the algorithm twice. For the first desk-check, use 20.5, 10.5, and 12.5 as the...
You are an IT manager for a small business. You are being asked to create a...
You are an IT manager for a small business. You are being asked to create a network security plan both for internal IT workers and for the company in general. You are to put together a network security plan that addresses each of the following components : Explain the use of virtual private networks (VPNs) and their security benefits and drawbacks. Create a standard procedure for adding new users to a network. Create a summary of a network plan, including...
Case 1 John is the manager of a small computer sales and support chain. He has...
Case 1 John is the manager of a small computer sales and support chain. He has stores located throughout the state of California and is in strong competition with all of the major computer providers within that state. John’s company is known for providing quick support and friendly service. In the process of selling goods to customers, John’s company will often offer deals that include free service or low-priced service for the products being purchased. John’s competitors offer the same...
Case 1 John is the manager of a small computer sales and support chain. He has...
Case 1 John is the manager of a small computer sales and support chain. He has stores located throughout the state of California and is in strong competition with all of the major computer providers within that state. John’s company is known for providing quick support and friendly service. In the process of selling goods to customers, John’s company will often offer deals that include free service or low-priced service for the products being purchased. John’s competitors offer the same...
In this exercise, you will create a program that displays the amount of a cable bill....
In this exercise, you will create a program that displays the amount of a cable bill. The amount is based on the type of customer, as shown in Figure 10-30. For a residential cus- tomer, the user will need to enter the number of premium channels only. For a business customer, the user will need to enter the number of connections and the number of premium channels. Use a separate void function for each customer type. If necessary, create a...
In this exercise, you will create a program that displays the amount of a cable bill....
In this exercise, you will create a program that displays the amount of a cable bill. The amount is based on the type of customer shown in figure 10-30. For a residential customer, the user will need to enter the number of premium channels only. For a business customer, the user will need to enter the number of connections and the number of premium channels. Use a separate void function for each customer type. Enter your C++ instructions into the...
You are required to create a sales and marketing management system with a small number of...
You are required to create a sales and marketing management system with a small number of common sense attributes. The system should contain the following information Sales details Marketing details Customer details Production details Delivery details Management details So consider what sales and marketing system is required to deliver a consistent and customer oriented service to all customers over the world. You need to identify the tables you require and the information that they are to contain. This is only...
You are required to create a sales and marketing management system with a small number of...
You are required to create a sales and marketing management system with a small number of common sense attributes. The system should contain the following information  Sales details  Marketing details  Customer details  Production details  Delivery details  Management details So consider what sales and marketing system is required to deliver a consistent and customer oriented service to all customers over the world. You need to identify the tables you require and the information that they...
Exercise 2: A company runs a small factory. You need to create apay slip for...
Exercise 2: A company runs a small factory. You need to create a pay slip for the employees of the company. The details of the Java application to be implemented is provided below.A. The factory workers are paid one of the three hourly rates depending on their skill level. Write a method to that takes the skill level as a parameter and returns the hourly rate. Use the switch construct in Java.B. Each factory worker might work any number of...
You are going to create a console based program to keep track of a small business...
You are going to create a console based program to keep track of a small business that sells Doodads. First you will need to create a class Doodad that keeps track of two integers and two Strings. Next, create a constructor for the Doodad. Next, add getters and setters for each of the fields (two integers and two Strings). You need to use Doodad.java (see the starter code) Inside your main method ask the user to read in the two...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT