Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE ANSWER AS SOON AS POSSIBLE given payrollFile.cpp code: // File: Payroll.cpp // Creates a company employee payroll file // computes total company payroll amount

PLEASE ANSWER AS SOON AS POSSIBLE

image text in transcribedgiven payrollFile.cpp code:

// 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 
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions