Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would you write this in C++ language with no global variables in visual studios ? Program Due 3/ Salesperson's Pay Using parallel arrays and

image text in transcribed
How would you write this in C++ language with no global variables in visual studios ?
Program Due 3/ Salesperson's Pay Using parallel arrays and output formatting The XYZCompany pays its sales staff a monthly salary, and keeps a record of the total amount of sales made by each person that month. Ifa person's total sales is at least S100,000.00, a bonus of S1000.00 is added to the monthly salary for that month's pay. The number of sales staff changes each month, but is never more than 150 An input file contains 3 lines ofdata for each employee: Employee name Roger Rabbit Amount of employee's monthly salary (with a dollar sign) S5388,500 S500942. Total sales made by the employee for the month (with a dollar sign) There are three-line entries for whatever number of people form the sales staff that month. The program will use three parallel amays for input data: one for employee names, one for employee salary, and one for the employee's total sales. The program will compute data for two additional parallel arrays, one for the bonus for each employee, and another for the employee's total pay for the month. The program also determines the Sales Employee of the Month (the employee with the highest total sales) Output will show the contents of the 5 arrays in a table with 5 columns; the first row ofoutput abels the columns. Use output formatting to insure that dollar amounts are shown with 2 decimal places, right adjusted in their columns so the decimal points line up. After the table, the Sales Employee of the month is named, along with his/her total sales for the month. Function Requirements: Input is done in a function; the calling program receives the 3 input arrays' contents and the number of sales employees Output is done in a function Example input file contents Roger Rabbit $5388.50 $500942.78 Wile E. Coyote $4200.00 $794.28 Corresponding output file contents Name Salary Sales Bonus Total Pay Roger Rabbit 5388.50 500942.78 $1000.00 6388.50 Wile E Coyote 4200.00 794.28 0.00 4200.00 Sales Employee of the Month: Roger Rabbit Amount sold by Roger Rabbit $500942.78 Note: The program must be written to handle any input file with the designated contents and form

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the relationship between diversity, inclusion, and equity?

Answered: 1 week ago