Reference no: EM13161273
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
Best way to multiply a chain
: What is the best way to multiply a chain of matrices with dimensions that are 10 x 5, 5 x 2, 2 x 20, 20 x 12, 12 x 4, and 4 x 60? Please show work.
|
Principle ofsuperposition to determine that system is linear
: Apply the principle of superposition to determine whether the following systems are linear. Sketch what the plot of the function looks like.
|
Criminal justice system-media
: Is the media in the United States an ally or an enemy to the criminal justice system? Support your response with practical examples from the media.
|
The manager of a football stadium
: The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There are four types of tickets-box, sideline, premium and general admission. The data is stored in a file, tickets.txt, in the fol..
|
Consists of an employee''s last name
: 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..
|
Storage of an unordered collection of items
: Storage of an unordered collection of items that facilitates efficient, random access of items based on an item's position in the collection.
|
District dominated by racial minorities determines
: A school board in a district dominated by racial minorities determines that students learn better when taught in a gender-segregated environment. The board then chooses schools within its district designated to serve only boys and others only girls.
|
Takes a string containing a full name
: Write a program that takes a string containing a full name and outputs each part of the name separately with its length. The name should be in the form of first, middle, and last name, separated from each other by a single space. For example, if the ..
|
An iterative algorithm to traverse an arbitrary number
: An iterative algorithm to traverse an arbitrary number of nested subdirectories in a file system.
|