c++ Payroll. Write a class name Payroll, with the class declaration in a file ca
ID: 669928 • Letter: C
Question
c++
Payroll.
Write a class name Payroll, with the class declaration in a file called Payroll.h and the implementation in a file called Payroll.cpp.
The class will have data members for an employee’s hourly pay rate, number of hours worked and calculate the total pay for the week. All of the data members will be doubles. The class only needs one constructor which can be a default constructor that sets all data members to zero. Then add the mutators and accessor for the class.
The program will have an array of 7 Payroll objects.
The program will prompt the user for number of hours each employee has worked
and will then display the amount of gross pay each has earned.
Before asking the user for the hours, the program should set the pay rate for each employee without user input.
Validation: Do not accept values greater than 60 for the number of hours worked.
Explanation / Answer
OUTPUT:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.