Question: C++ Using the #includes , , and to complete the following program You just got a job at SellUAnything Inc. and they want you to

C++ Using the #includes , , and to complete the following program

You just got a job at SellUAnything Inc. and they want you to write a program that will analyze their sales force for meeting quotas over the last year. Based on the results of this analysis they can determine what actions they should take with their salespeople.

SellUAnything Inc. has the last years information recorded by salesperson by month which you'll use as input. What they what to know is if there appears to be a selling problem with not meeting total yearly quotas and which salesperson is the worst offender. They've identified that if more than 20% of the sales force did not meet yearly quotas they should implement a "Sell IT! OR Else Campaign" as an incentive. Provide a program that

reads in the number of salespeople

reads in the quota for that salesperson

reads in 12 actual monthly sales counts for that salesperson

determines number of months the salesperson did or did not meet quota

decides whether a campaign should be mounted

identifies the worst salesperson for meeting quotas

You will use prog3a.txt as input, this file has the following format: [call it Fig. 3a]

number of salespeople - int

salesperson name - string

quota - int,

12 actual monthly sales - int

Example output from prog3a.txt: [call it Fig. 3b]

Total Salespeople: 4

Salesperson Quota Monthly Sales Under =>

MBanner 35 35 35 35 35 35 35 35 34 35 35 35 36 1 11

BHunter 40 20 40 70 35 45 78 34 56 73 15 41 55 4 8

GJorgensen 60 62 47 68 40 53 62 88 18 15 72 12 19 7 5

TSmith 25 66 32 41 89 27 25 29 33 54 27 32 45 0 12

A "Sell IT! OR Else Campaign" must be mounted - 75% did not make yearly quotas Consider firing: GJorgensen

prog 3a:

4

MBanner 35 35 35 35 35 35 35 35 34 35 35 35 36

BHunter 40 20 40 70 35 45 78 34 56 73 15 41 55

GJorgensen 60 62 47 68 40 53 62 88 18 15 72 12 19

TSmith 25 66 32 41 89 27 25 29 33 54 27 32 45

1. Get ready to read file "prog3a.txt".

//

// 2. Get the number of salespeople from the file and display it

//

// 3. Display line of column titles

//

// 4. set qutasMissed to 0, set worst to 0

//

// 5. For each salesperson:

// 5a. determine how many month missed and how many month met quota

// 5b. determine if the monthsMissed > 0

// - if true, increment quotasMissed

// 5c. determine the worst sales person

// - if monthMissed > worst

// save salesperson's name to worstSalesperson and save quotaMissed to worst

//

// 6. Determine if (quotasMissed * 100 / totalSalespeople) > MAX_FAIL

// - if true, display 'need sales campaign' message

// - else, display 'good work' message

//

// 7. Display "Consider firing: worstSalesperson

//

// 8. Terminate program with "Program completed" message

/*

Determine how many month missed and how many met quota

1. get and display the name

2. get and display quota

3. set monthsMissed to 0

4. for each month

4a. get monthSales figure

4b. if monthSales < quota, increment monthsMissed

4c. display monthSales

5. month met = 12 - month missed

6. display month missed, month met

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!