Write a program that calculates and prints the monthly paycheck for three employees of a sales company. You are given a file, employees.txt with the following data:
Thomas Andrew 2787.87 11987 17.5
Green Betty 1845.37 19432 14.2
Paul George 3124.11 5134 11.25
Each input line consists of an employee's last name, first name, current base salary, total sales and percent commission. For example, in the first input line, the last name of the employee is Thomas, the first name is Andrew, the current base salary is 2789.87, the total sales is 11987 and the commission is 17.5% of the total sales. The net pay for all employees is calculated after taking the following deductions:
Federal Income Tax: 11.75%
Provincial Tax: 5.15%
CPP: 1.75%
EI: 0.85%
RRSP: 7.45%
Health Insurance: $67
Write a program that reads data from the specified file and stores the output in the file employees_increase.txt. Format your output to have two decimal places.
A sample output is as follows:
Name: Andrew Thomas
Base Amount: ............. $ 2787.87
Commission: .............. $ 2097.72
Gross Salary: ............ $ 4885.60
Federal Tax: ............. $ 574.06
Provincial Tax: .......... $ 251.61
CPP: ..................... $ 85.50
EI: ...................... $ 41.53
RRSP: .................... $ 363.98
Health Insurance: ........ $ 67.00
Net Pay: ................. $ 3501.93