Question: C++ Please show me the sample output from your sreen. Thanks ! In this assignment, you will be developing a payroll program for a hospital.
C++ Please show me the sample output from your sreen. Thanks !
In this assignment, you will be developing a payroll program for a hospital. The program calculates
the salaries for employees and volunteers. The program uses the following classes to achieve this
goal:
- The StaffMember class: an abstract class that does not represent a particular type of
employee or volunteer.
- The Volunteer class: Volunteers work on special events and they are not paid. So, this class
represents a person who is not compensated monetarily for his or her work. It keeps track
of only the basic information of a volunteer.
- The Employee class: represents an employee who gets paid at a particular rate each pay
period.
- The Doctor class: represents an employee who earns 10% of the total costs of each surgery
he or she may perform in addition to the normal pay rate.
- The Nurse class: represents an employee who is paid on hourly basis.
- The Executive class: represents an employee who may earn a bonus in addition to his or her
normal pay rate.
- The Receptionist class: represents an employee who is paid a normal pay rate only.
- The driver program mainHospital.cpp (main()) creates a staff of employees and calls the
pay() function to pay them. When the program is run, it should display the information
about each employee and how much he/she should be paid. Also, the program will create
volunteers.
Create the following StaffMember objects in order to find their pay rates:
Volunteer:
Name: Diana, Address: 11 South Paris Hill Rd., Phone: (984) 163-0125.
Volunteer:
Name: Ryan, Address: 625 Amerige Dr., Phone: (750) 837-4154.
Doctor:
Name: Dickson, Address: 311 Delaware Ave., Phone: (275) 249-0721, SSN: 047-86-8586, Pay
Rate: $150/hr, Number of working hours: 160, Surgeries: 3, Cost of each surgery: $10,000.
Nurse:
Name: Clarke, Address: 933 Honey Creek St., Phone: (722) 521-3317, SSN: 417-46-7995, Pay
Rate: $50.5/hr, Number of working hours: 80.
Nurse:
Name: Rose, Address: 99 Harvard St., Phone: (672) 790-2499, SSN: 517-42-5738, Pay Rate:
$45.9/hr, Number of working hours: 100.
Receptionist:
Name: Sam, Address: 8426 Proctor St., Phone: (301) 936-4987, SSN: 365-07-9906, Pay Rate:
$30/hr, Number of working hours: 160.
Executive:
Name: Anderson, Address: 6200 Seaside Dr., Phone: (361) 956-4787, SSN: 678-16-4701, Pay
Rate: $130/hr, Number of working hours: 160, Bonus: $12,000.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
