Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assignment is a continuation of the last assignment whereby we process employee payroll data in the file payroll.txt to produce a report that calculates
This assignment is a continuation of the last assignment whereby we process employee payroll data in the file payroll.txt to produce a report that calculates the gross and net pay for each employee as well as the total-gross and total net pay for all employees in the file. The input and the algorithm for this program are identical to the previous exercise except that we're going to ask you to implement some portions of the algorithm with additional functions that utilize reference parameters. Assignment 6 Statement: Write a program in a file named Payroll6.cpp that creates the same output and implements the same algorithm as Payro115.cpp in the previous exercise. In particular, the functions instructions, reportTitle), displayEmployeeInfo), and totalAmounts) should be present in this solution as well as two additional func- tions named readData) and calculate() that manipulate reference parameters. The function readData) should read the name, hourly, hours and rate from the ifstream where these variables have the same meaning as they did in Payro115.cpp and return these updated values to the invoking function. The function calculate ) determines the gross and net in addition to updating the total gross and the total_net based upon the hourly, hours and rate and likewise returns the values to the mainO. As with Payro115.cpp, the program should perform all input from the sequential file payroll.txt and perform all output to the monitor. Our specifications and variables are not going to change with this solution, however our use of functions will need to include those that use reference parameters in addition to the functions that we've used that have used value parameters. This assignment is a continuation of the last assignment whereby we process employee payroll data in the file payroll.txt to produce a report that calculates the gross and net pay for each employee as well as the total-gross and total net pay for all employees in the file. The input and the algorithm for this program are identical to the previous exercise except that we're going to ask you to implement some portions of the algorithm with additional functions that utilize reference parameters. Assignment 6 Statement: Write a program in a file named Payroll6.cpp that creates the same output and implements the same algorithm as Payro115.cpp in the previous exercise. In particular, the functions instructions, reportTitle), displayEmployeeInfo), and totalAmounts) should be present in this solution as well as two additional func- tions named readData) and calculate() that manipulate reference parameters. The function readData) should read the name, hourly, hours and rate from the ifstream where these variables have the same meaning as they did in Payro115.cpp and return these updated values to the invoking function. The function calculate ) determines the gross and net in addition to updating the total gross and the total_net based upon the hourly, hours and rate and likewise returns the values to the mainO. As with Payro115.cpp, the program should perform all input from the sequential file payroll.txt and perform all output to the monitor. Our specifications and variables are not going to change with this solution, however our use of functions will need to include those that use reference parameters in addition to the functions that we've used that have used value parameters
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started