Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would you create this program in c++ language, and not using no global variables? Using parallel arrays and output formatting The XYZ Company pays

image text in transcribed
image text in transcribed
How would you create this program in c++ language, and not using no global variables?
Using parallel arrays and output formatting The XYZ Company pays its sales staff a monthly salary, and keeps a record of the total amount of sales made by each person that month. If a person's total sales is at least S100,000.00, a bonus of si000.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 of data for each employee: Employee name Roger Rabbit Amount of employee's monthly salary (with a dollar sign) S5 388.50 Total sales made by the employee for the month (with a dollar sign) 500942.78 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 anrays in a table with 5 columns; the first row of output labels 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 hisher 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 S5388,50 $500942.78 Wile E. Coyote $4200.00 S794.28 Corresponding output file contents: Sales Bonus Total Pay Salary 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 1 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_2

Step: 3

blur-text-image_3

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago