Consists of an employee''s last name

Assignment Help C/C++ Programming
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

Reference no: EM13161273

Questions Cloud

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.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write program which reads n numbers from keyboard

Write down C++ program which reads N numbers (positive, negative, integer and double numbers) from keyboard, computes and shows the following information. Largest number of all numbers entered from keyboard.

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

  Write a matrix multiplication program

Write a C++, matrix multiplication program which you can instrument to monitor and measure execution time as a function of problem size. Make sure it works in Microsoft Visual Studio.

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  Calculates the student * averages and quiz averages based

Calculates the student * averages and quiz averages based upon input from the user. Modify this program to read in the following grade text file, * with a maximum number of students set to 35 and having five quiz scores for each student. The output s..

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  Takes 100 number in an array

Write a program in c++ that takes 100 number in an array and add them and print the sum

  Write c function to sort one dimensional integer array

Consider the values sorted in the array. Sort it in ascending order using Bubble sort technique showing all iterations: write C function to sort one dimensional integer array in ascending order.

  Grocery store program

This program draws upon several concepts that were covered in CptS 121 and should serve as a good refresher for CptS 122. Our store, Cougar Mart, maintains its inventory in a text file. Not being very tech savvy, the owner of Cougar Mart needs you to..

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Write a c function to convert gallons-quarts-pints and cups

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd