For each employee compute the tax paid by the employee


Print the following heading at the top of the output page: Gang Corporation Payroll

Read an unknown number of employee data records as shown below. Each group of data will contain an employee's first and last name, hours worked, the rate of pay and age. A typical group of data will be:

Duck, Donald

45.0 3.25 51

Print the data as it is read; together with appropriate messages (e.g., the name is ..., the rate of pay is ..., etc.).

For each employee, compute and print the employee's base pay, which includes overtime (paid at one and a half times the normal rate) for each hour over 40. For example, if an employee earning $20.00 per hour works for 48 hours, then she will be paid for 40 hours at her normal rate plus 8 extra hours at $30.00 (one and a half times $20.00).

For each employee compute the tax paid by the employee, according to this formula: If the employee is 55 years old (or older), then the employee pays tax at a rate of 50% of the base pay; if the employee is below 55, then the tax is 10% of the base pay. Print the tax and the net pay after taxes.

Repeat this process until you have read the last employee. You must decide how to detect the end of the data (you should explain your method in a comment).

Print the age and name of the oldest employee. Do the same for the youngest employee.

Print the name and taxes of the employee who paid the most in taxes.

Print an alphabetically sorted list of all the company's employees.

Print a list of the employees sorted by net pay.

After all your results have been printed, print a message saying that the payroll program is complete.

Data:

Duck, Donald

45.0 3.50 60

Mouse, Mickey

35 6.50 55

Brown, Charlie

35 3.00 20

Oyle, Olive

40 4.50 60

Man, He

45 7.50 20

Ra, She

40 3.50 20

Jetson, George

45 3.50 55

Starr, Brenda

35 8.40 60

Woman, Wonder

40 3.50 55

Jets, Green

45 13.50 55

Barr, Jimmy

35 9.00 60

Evans, Robert

40 8.00 55

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: For each employee compute the tax paid by the employee
Reference No:- TGS02897284

Expected delivery within 24 Hours