Question: PayrollFile.cpp coding below: // File: Payroll.cpp // Creates a company employee payroll file // computes total company payroll amount #include // required for file streams

PayrollFile.cpp coding below:
// File: Payroll.cpp // Creates a company employee payroll file // computes total company payroll amount #include// required for file streams #include // for definition of EXIT_FAILURE #include #include using namespace std; // Associate streams with external file names #define inFile "EmpFile.txt" // employee file #define outFile "Salary.txt" // payroll file // Functions used ... // PROCESS ALL EMPLOYEES AND COMPUTE TOTAL float processEmp(istream&, ostream&); int main() { ifstream eds; // input: employee data stream ofstream pds; // output: payroll data stream float totalPayroll; // output: total payroll // Prepare files. eds.open(inFile); if (eds.fail ()) { cerr > firstName >> lastName >> hours >> rate; while (!eds.eof()) { salary = hours * rate; pds > firstName >> lastName >> hours >> rate; } // end while return payroll; } // end processEmp
Programming Challenge: Do not copy other works. If you copy code from others, you might get F for the course Write a program that prints payroll checks using the file produce by the payroll program described in payrollFile.cpp. The format of the checks should be similar to the one shown in the following figure: Rowan University Glassboro, NJ Check No. 001 Date: todays date Pay to the Order of: elliotkoffman 400.00 Your name Programming Challenge: Do not copy other works. If you copy code from others, you might get F for the course Write a program that prints payroll checks using the file produce by the payroll program described in payrollFile.cpp. The format of the checks should be similar to the one shown in the following figure: Rowan University Glassboro, NJ Check No. 001 Date: todays date Pay to the Order of: elliotkoffman 400.00 Your name
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
