Question
C++ rray of Payroll Objects Design a PayRoll class that has data members for an employees hourly pay rate and number of hours worked. Write
C++
rray of Payroll Objects Design a PayRoll class that has data members for an employees hourly pay rate and number of hours worked. Write a program with an array of seven PayRoll objects. The program should read the number of hours each employee worked and their hourly pay rate from a ?le and call class functions to store this information in the appropriate objects. It should then call a class function, once for each object, to return the employees gross pay, so this information can be displayed. Sample data to test this program can be found in the payroll.dat ?le.
To create the payroll.dat file, please open notepad, copy/paste the following data and save the file as payroll.dat file. Please make sure to save the file in a place where your program file is located. In otherwords, please do not hard code the path for the payroll.dat .
40.0 10.00 38.5 9.50 16.0 7.50 22.5 9.50 40.0 8.00 38.0 8.00 40.0 9.00
Mimir Requirements:
Mimir file name must be: CS939Homework8A.cpp
Here is the sample output.
Employee 1: 400.00
Employee 2: 365.75
Employee 3: 120.00
Employee 4: 213.75
Employee 5: 320.00
Employee 6: 304.00
Employee 7: 360.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started