Question: IN C++ Payroll Class below #include #include using namespace std; class PayCheck { private: string firstName; string lastName; // employee's last name string street; string

IN C++

IN C++ Payroll Class below #include #include using namespace std; class PayCheck

{ private: string firstName; string lastName; // employee's last name string street;

Payroll Class below

#include

#include

using namespace std;

class PayCheck {

private:

string firstName;

string lastName; // employee's last name

string street;

string city;

string state;

string zip;

string empNum;

string payDate;

double hoursWorked;

double payRate;

int numDeduct;

public:

string get_firstName() {

return firstName;

}

void set_firstName(string name) {

firstName = name;

}

double grossPay() {

double grossPay = hoursWorked * payRate;

return grossPay;

}

double fedTax() {

return .22 * ((hoursWorked * payRate) - (numDeduct * 75.00));

}

double stTax() {

return .04 * ((hoursWorked * payRate));

}

double ssMediTax() {

return .0765 * (hoursWorked * payRate);

}

double netPay() {

return (hoursWorked * payRate) - (fedTax() + stTax() + ssMediTax());

}

}; // ends class

Problem 1- Payroll processing You are provided a file of containing payroll data for 10 employees of ACME Systems, inc layout of each file records is as follows: The hours worked hourly pay number of rate first name last name |employee number deductions Write a program that reads the input file and produces an output file containing a payrol report. The program must use the Payroll class that you've already created. The program should . instantiate a Payroll object, then use a loop to read each record from the input file, set the member variables of the Payroll object, perform the various calculations using the methods defined in the Payroll class, and write the appropriate payroll information in the output file. (See example on next page). You will have to calculate the following information using the methods defined in the Payroll class: . . Gross pay equals hours worked times hourly pay rate. Deduction amount is equal to 75 times the number of deductions Adjusted gross pay is equal to gross pay minus deduction amount. Federal tax equals 22% of adjusted gross pay. . tate tax equals 4% of gross pay (adjusted gross pay is only used to calculate federal tax) Social Security/Medicare tax is equal to 7.65% of gross pay. Net pay is equal to gross pay minus all taxes (federal , state and social security/medicare . vour program may use either a counter-driven loop (10 records), or an event driven loop (End ur final report should take the form illustrated on the next page. Be sure to use the manipulators (fixed, setprecision(), etc.) to format the output as close as possible to the report above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!