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

  Prepare the weighted scoring model for three exams

Prepare the weighted scoring model. Final grades are based on three exams worth 15%, 20%, and 25%, respectively; homework is worth 20%.

  Design in c a unix utility program gasp

Design in C a Unix utility program gasp. Command gasp [options] STRING FILE... must read listed files (FILE...) and copy each line from input to stdout if it contains STRING.

  Create class has three pieces of information as data members

Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int).

  Define a structure to store marks of a student

Define a structure to store roll no, name and marks of a student - using the structure of Q2. a), above write a 'C' program to create a file "student.dat". There must be one record for every student in the file.

  Write recursive boolean method to accept array and value

Write down the recursive boolean method named isMember. The method must accept two arguments: an array and a value. Method must return true if value is found in array.

  Write a program to calculate existing angles

Write a program to calculate existing angles and do if and then from this, and to place fixed angles at certain position.

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Write main function to compute stress-strain in steel rod

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads.

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  C program that compare the time required

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

  Write function to find whether number is perfect number

Write down the function perfect which determines whether number is perfect number or not. This function must receive number and return true if number is perfect.

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