Question: C++ Question: 1) Program an Employee class with these member variables: last name hourly pay rate number of hours worked Your class should have these
C++ Question:
1) Program an Employee class with these member variables: last name hourly pay rate number of hours worked Your class should have these member functions: constructor - creates new Employee object and inputs all member variables get functions returns values of member variables set functions sets values of member variables totalPay computes hours worked times pay rate and returns total pay for each employee
2) Write a main program which creates an array of four Employee objects. The program should input name, pay rate, and hours worked for each object, and display total pay. Your output should look something like this: Employee Name Gross pay ======== ==== ========= 1 Jackson $ 400.00 2 Rodriguez $ 365.75 3 Chang $ 120.00 4 Demos $ 213.75
3) Separate your class definition and main program from part 2 into two files. Ensure you can build and run your program with the same output.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
