Question: i need help with this problem that i keep getting an error with. Design a PayRoll class that has data members for an employee's hourly

i need help with this problem that i keep getting an error with.

Design a PayRoll class that has data members for an employee's hourly pay rate and number of hours worked. The class should have member functions to set the hourly pay rate and number of hours worked and to calculate gross pay.

The main program should create an array of seven PayRoll objects. It should contain two loops. The first loop should read the number of hours each employee worked and their hourly pay rate from a file and call class set functions to store this information in the appropriate objects.

The second loop should call a class function, once for each object, to return the employee's gross pay, and display it as follows. Attached to this assignment is a payroll.dat file that can be used for testing your program.

i need help with this problem that i keep getting an error

Sample Output: Employee Gross pay 400 . 00 365.75 120.00 NOUDWNP 213.75 320.00 304. 00 360. 00

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 Programming Questions!