Question

In: Computer Science

CPSC1103 ASSIGNMENT #4 You are the manager of a travel agency with 20 employees. You have...

CPSC1103 ASSIGNMENT #4
You are the manager of a travel agency with 20 employees. You have announced a promotional campaign for your agents to sell vacation packages. Each day you will enter the ID number of the agent (#1 - #20), the number of packages sold, and the dollar value of the package. Entries will be in a random order and the total $ value is accumulated for a 3-week period. At the end of the campaign you want a print out of those agents who sold less than $2000.00 in the 3-week time frame. You will also want a list of those that did not participate in the campaign (ones with no sales).
Input and output are done using files and the eof function.
SAMPLE INPUT:
1 3
2 0
15 1 3 4
12 2
13 4
2 5 1 2 7 5 1 5 3 4 21 3 -1 4
15 1
16 6
19 6 9 5 18 2 5 -2 15 6 13 2 17 3 25 5
250.00 0
1000.00 300.00 500.00 350.0 550.0 300.00 1250.0 150.0 115.00 400.00 250.00 200.00 350.0 1590.0 -150.00 140.00
115.5 530.0 550.00 1150.0 1350.0
(eg. Agent #1 sold 3 packages
at $250.00 for a dollar value
of $750.00)

SAMPLE OUTPUT:
KWANTLEN TRAVEL AGENCY LIST OF INVALID ENTRIES
-2-
21 3 -1 4 9 5 5 -2 25 5
400.00 250.00 -150.00
115.5 1350.0
** invalid agent # ** ** invalid agent # ** ** invalid price **
** invalid packages ** ** invalid agent # **
TOTAL SALES BY AGENT
# SALES VALUE/SALE AMOUNT
1
2 2 550.00 3 8 207.50 4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
TOTAL SALES (NUMBER OF PACKAGES) FOR ALL AGENTS: AVERAGE SALES VALUE FOR ALL PACKAGES FOR THE COMPANY: TOTAL VOLUME IN SALES FOR THE COMPANY:
AGENT NUMBER
10 210.00 2100.00 1100.00 1660.00
7 1250.00
8750.00
1000.00 2500.00
4380.00 2100.00 3450.00 280.00 9540.00
2 500.00 6 416.67
8 547.50 6 350.00 3 1150.00 2 140.00 6 1590.00

-3-
TOP 5 WINNER OF THE SALES CAMPAIGN BY TOTAL DOLLARS IN SALES
AGENT
DOLLAR VOLUME SOLD
19 $9540.00 7 $8750.00 15 $4380.00 17 $3450.00 13 $2500.00
AGENTS WHOSE SALES WERE BELOW $2000.00
AGENT
2 3 12 18
DOLLAR VOLUME SOLD
$1100.00 $1660.00 $1000.00 $ 280.00
AGENTS WHO DID NOT PARTICIPATE IN THE CAMPAIGN
4 5 6 8 9 10 11 14 20
HAND IN THE FOLLOWING:
a) a listing of your program and actual runs with the given data.  includes comments for each section
b) sample data
 test all pathways in your program including all error checks
c) sample report
 show the results of all representative tests
d) PROGRAMMER DOCUMENTATION
 methods used in coding your program
 use structured flowchart or pseudo codes to explain logic (algorithm).  storage layout and variable list with meanings of all variables.
e) user's guide
- a separate document which has the following:
  
-4-
- user purpose
- sample input & output
- show what it does
- state how to run the program
- describe any restrictions or limitations - show error checks and error messages
You need four arrays:
int agentNo[21] = { 0, 1,2,3,4, 5, 6 ...}; int numberPackages[21] = {0};
float totalSales[21] = {0.0};
float averageSales[21] = {0.0};
Read in :
1 3 250
int AgentNo , NoPackages ; float PricePackage;
ins >> AgentNo >> NoPackages >> PricePackage; if all three data are good then
numberPackages[ ] += NoPackages; totalSales[ ] += NoPackages * PricePackage;
AgentNo
AgentNo

-5-
Once when everything is read in you sort the four parallel arrays by totalSales


C++ programming

Solutions

Expert Solution

#include<iostream>

#include <sstream>

#include <string>

#include <fstream>

using namespace std;

int main(void)

{
// build a read-Stream
ifstream source;
//open file
source.open("numbers.txt", ios_base::in);
//file not found
if (!source)
{
cerr << "Can't open Data!\n";
}
//if file found
else
{
//declaring required variables
int agent,products,sales[20]={0},total_sales=0;
double agents_amount[20]={0},cost,total_amount=0;
/reading and checking each line entry
cout<<"\t- LIST OF INVALID ENTRIES -"<<endl;


Related Solutions

The manager of a travel agency asked you to come up with a forecasting technique that...
The manager of a travel agency asked you to come up with a forecasting technique that will best fit to the actual demand for packaged tours. You have observed and recorded the actual demand for the last 10 periods. You also identified two possible techniques for consideration: 2-month moving averages (F1), and exponential smoothing (F2) with a smoothing constant of 0.40. Using Cumulative Forecasting Error (CFE) and Mean Absolute Deviation (MAD) as your performance measures you will determine the technique...
For a travel agency clerk, it is expected to take 20 minutes to deal with a...
For a travel agency clerk, it is expected to take 20 minutes to deal with a customer. On a weekend, an average of two customers per hour arrive at the agency. Both the customer arrival times and clerk’s servicing times are modelled by an exponential distribution. a. What is the arrival rate per minute? b. What is the servicing rate per minute? c. What is the servicing rate per hour? d. What is the traffic intensity? e. What is the...
Imagine yourself Human Resource manager and you have a team of 20 employees, how would you...
Imagine yourself Human Resource manager and you have a team of 20 employees, how would you conduct job analysis? What are your considerations regarding training & development program? Also select compensation plan for your employees.
For this assignment, imagine you have been contacted by an agency in your community to provide...
For this assignment, imagine you have been contacted by an agency in your community to provide consultation on how they might improve their services to clients. The agency is concerned that clients with serious counseling issues are "falling between the cracks" when they are referred to others in the community for intensive treatment. Furthermore, the brief aftercare they provide is not accessible enough to sufficiently support clients as they re-integrate into the community. 1) Identify a population with mental health...
For this assignment, imagine you have been contacted by an agency in your community to provide...
For this assignment, imagine you have been contacted by an agency in your community to provide consultation on how they might improve their services to clients. The agency is concerned that clients with serious counseling issues are "falling between the cracks" when they are referred to others in the community for intensive treatment. Furthermore, the brief aftercare they provide is not accessible enough to sufficiently support clients as they re-integrate into the community. 1) Identify elderly individuals who are socially...
research about the importance of travel agency
research about the importance of travel agency
A local travel agency gives you a list of accounts and balances at the end of...
A local travel agency gives you a list of accounts and balances at the end of the year. All balances are the accounts normal balance. Prepare a trial balance in the correct order and then answer the following questions. Sales Revenue $59,600 Salaries Expenses $28,500 Owners Equity $40,085 Cash at Bank $13,000 Supplies Expense $5,200 Accounts Receivable $21,200 Supplies On Hand $8,500 Rent Expenses $15,600 Equipment $31,500 Accounts Payable $11,100 Salaries Payable $2,800 Bank Fees $85 Bank Loan $10,000 How...
you are the manager of a coffee shop and your employees have had poor attendance. You...
you are the manager of a coffee shop and your employees have had poor attendance. You want to understand why so many employees are missing work and find out how to improve employee engagement. To do this you plan to conduct an employee survey. Compose a 10-question survey that you will distribute to your employees. Your survey should include instructions on how to complete the survey, and the survey’s purpose.
A branch manager has 4 inside sales employees. The manager wants to know if there is...
A branch manager has 4 inside sales employees. The manager wants to know if there is any difference between these employees in terms of average time to enter an order into the system. You are tasked to evaluate the collected data and prepare a report regarding your findings. Order Number Employee I Employee II Employee III Employee IV Time to Enter (in minutes) 1 5 12 8 10 2 7 12 11 9 3 9 2 7 5 4 6...
Question-4 Travel Agency specializes in flights between Toronto and Peru. It books passengers on Toronto Air....
Question-4 Travel Agency specializes in flights between Toronto and Peru. It books passengers on Toronto Air. North’s fixed costs are $35,000 per month. Toronto Air charges passengers $1,700 per round-trip ticket. Calculate the number of tickets North Travel must sell each month to (a) break even and (b) make a target operating income of $17,000 per month in each of the following independent cases. Required: 1. North’s variable costs are $33 per ticket. Toronto Air pays Sunset 5% commission on...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT