CS 1119 Programming in C++ Project 10 Please separate this project into 3 files
ID: 3687774 • Letter: C
Question
CS 1119 Programming in C++ Project 10 Please separate this project into 3 files interface.h implementation.cpp testing.cpp
The test file should look similar to this
#include "Employee1.h"
int main()
{
Employee1 myEmployee1;
myEmployee1.setTaxRate();
myEmployee1.EmployeeInfo();
}
Create a program that calculates and displays (to 2 places ofdecimal) the weekly
gross pay of hourly employees, contract employees, and salaried employees.
? The weekly gross pay of a salaried employee is calculated by dividing the
employee’s annual salary by 52.
? The weekly gross pay of an Hourly employee is calculated as follows:
o If the employee works for 40 hours or less, the gross pay is calculated
by multiplying the number of hours worked by the pay rate.
o If the number of hours worked by the employee exceeds 40hours, but
is not over 50 hours, the employee will receive regular pay for the first
40 hours, and receive time-and-a-half pay for the hours in excess of 40.
o If the number of hours worked by the employee exceeds 50 hours, the
employee will receive regular pay for the first 40 hours, receivetimeand-a-half
pay for the time between 40 and 50 hours, and receive
double pay for the time over 50 hours.
o An hourly employee must not work more than 60 hours per week.
? The weekly gross pay of a contract employee is calculated by multiplying the
number of hours worked by the pay rate, regardless of the number of hours.
A contract employee must not work more than 50 hours per week.
At the start of the program, you should prompt for, and supply the Federal Tax rate
and the State Tax rate to be used for the hourly and salaried employees. No tax is
withheld from the contract employee’spay check. If 0 is entered for federal tax
rate, use 10% forfederal tax rate. If 0 is entered for state tax rate, use 5% for state
tax rate.
The program should also prompt for each employee’s first name, middle name and
last name.
In addition to the Gross Pay, display the following information:
Employee’s name, in the format: First Initial (First character only offirst name),
Second Initial (First character only of middle name), and Last Name.
o Example: R M Jones
Page 2 of 4
Federal Tax
State Tax
Total Tax
Net Pay
(All amounts should be calculated to 2 places of decimal)
Create separate methods for the calculation of gross pay, and each of the above
amounts.
Create three overloaded functions (one each for the Hourly employees, the
contract employees, and the salaried employees).
The Hourly employee function should receive two values (hours worked and pay
rate), the contract employee should receive three values (hours worked, pay rate,
and the ID of the company the contract employee is from), and the Salaried
employee function should receive one value (yearly salary).
Continue to request, calculate and print employee information until there is no
more employee data to be processed. Your program must be able to process
zero employees, to an infinite number of employees.
Demonstrate the use of the following in your solution:
? Function Overloading
? Default arguments
? Two uses of pass-by-reference using Pointer arguments.
As usual, your solution must be separated into, at least, three source files
(Interface, Implementation, and Test files). There should only be minimal code in
the Test file, just enough to instantiate an object, and invoke the appropriate
function(s).
. Only .cpp
and .h files will be accepted. If you submit other types of files, they will be rejected,
and you’ll receive no points for the project.
Grading Criterias