Question: This is C++ Program needs to be compiled with GNU C++ compiler Write a program in a file named Payroll3.cpp that creates the same output
This is C++ Program needs to be compiled with GNU C++ compiler

Write a program in a file named Payroll3.cpp that creates the same output and implements the same algorithm as Payroll2.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 functions 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 Payroll2.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 main(). As with Payroll2.cpp, the program should perform all input from the sequential file payroll.txt and perform all output to the monitor name, hourly, hours, rate Employee name (contains embedded blanka), hourly rate, hours worked and tax rate net, gross net and gross income for employee total_net, total_gross total net and total gross income (accumulation variables) payroll.txt Read employee name, hourly rate, hours worked and tax rate from the input file payroll.txt # # tax rate > # # Example John Smith#10.45 40 15 Jane Doe#12.50 45 15 Harry Morgan#20.00 40 20 Carmen Martine z#25.00 35 25 Jacintha washington#50.85 60 35 Since the name contains embedded blanks, we can use a form of the getline() function to read the input for us. This function comes in a couple of versions and the one that we're interested in accepts 3 parameters. getline(ifstream, string, char) Reads a string from ifstream terminated by a character with the value of the char parameter. All character on the line up to but not including the first instance of char are stored in the string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
