Post a New Question

programming

posted by .

b. Write a well-commented C++ program that reads data from the input file employee.txt. Each input line consists of last name, first name, base salary, total sales, and number of years of service.
Store the output in the file employees_payCheck.txt. Format your output to have two decimal places.

A sample output written to the output file employees_payCheck.txt is as follows:
Name: Andrew Thomas
Base Amount: ............. $ 2787.87
Bonus: ................... $ 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

You have to submit the output file employees_payCheck.txt along with your code (.cpp file) for this question.

Display the results on screen. Format your output to have two decimal places.
A sample output is as follows:

Name Base Salary Bonus Gross Salary Net Pay

Andrew Thomas $ 4885.60 $ 2097.72 $ 4885.60 $ 3501.93

Omar Taha $ $ $ $

Alice Smith $ $ $ $

  • programming -

    What have you done so far, and how would you like us to help?
    Can you show us your pseudocode?

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Java

    I need to write a Java program using an input file with the below data. I don’t even know where to begin. I have written others but this one has me totally confused. I know how to do it using math WL% = Wins / (Wins + Losses) I also …
  2. Unix Script

    "Using "if" statement checks for a file called "student.txt" in the current directory. Removes (deletes) the file if it exist. This file will collect last name, first name, and grade for 5 people. Use a while loop to get the information …
  3. Unix Shell script

    Shell script Using "if" statement checks for a file called "student.txt" in the current directory. Removes (deletes) the file if it exist. This file will collect last name, first name, and grade for 5 people. Use a while loop to get …
  4. programming

    Write a C program to sort the bags by weight. Assume that the input is given in a file. Each line of the input file corresponds to one polythene bag. For example a line in the file as below 10,20,20,10,10,50,10,50 corresponds to a …
  5. Programming

    2. Then it should prompt the user for the input file name of the file containing the data to sort. 3. If the program can't open the file or if no file name is entered (^d or ^z is entered for EOF), it should print an error message …
  6. programming

    You are required to design and write an application that will analyze an input file (InputFile.txt); the file contains a date on each line. Your algorithm should output all the missing dates, excluding Saturdays and Sundays. You should …
  7. programming logic

    Find Bugs in the pseudocode // A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 through 4) // and number of cans collected // Data is entered continuously until …
  8. programming

    Design a program and write program that will read a file of sales records and produce a sales report. Each record in the file contains a customer's number and name, a sales amount and a tax code. The tax code is to be applied to the …
  9. c programming

    Write a program to read from a file called "input.txt" information about 5 workers. Each line would contain two values respectively, an employee ID and the employee's monthly salary. Assume that the data from the input file is stored …
  10. FL

    • Loops • File processing • Previously mastered course topics Create an application allowing employees to take orders and then tally up the total costs from its customers. The coffee shop offers the following items on its menu: …

More Similar Questions

Post a New Question