Implement record keeping program by creating employee class


Problem

Suppose we are designing a record-keeping program that has records for salaried employees and hourly employees. There is a natural hierarchy for grouping these classes.

These are all classes of people who share the property of being employees.

Employees who are paid an hourly wage are one subset of employees. Another subset consists of employees who are paid a fixed wage each month or week. Although the program may not need any type corresponding to the set of all employees, thinking in terms of the more general concept of employees can be useful. For example, all employees have names, Social Security numbers (ssn) and net pay, and the member functions for setting and changing the name, ssn and netpay would be same for both hourly and salaried employees.

Implement the above mentioned record keeping program by creating an Employee class with data members name, ssn, and netpay. Include the default and parameterized constructors, member functions to set and get the data members. Also, make a printCheck function that should display error message that "printCheck Function Called for an undifferentiated employee"

Make HourlyEmployee class (inherit from Employee class) with data members wageRate and hours (think rationally about the data types). Include the default constructor, parameterized constructor, setter, getter and printCheck function. The printCheck function should display the following output:

Pay to the order of John Blue
The sum of 10000 Dollars
Check Stub: NOT NEGOTIABLE
Employee Number:
Hourly Employee
Hours Worked: hours Rate: Pay:

Similarly, make SalariedEmployee, inherit from Employee class, with data member salary. Define the constructors, setter and getter methods and printCheck function. The printCheck function output should be as follows:

Pay to the order of John Blue
The sum of 10000 Dollars
Check Stub: NOT NEGOTIABLE
Employee Number:
Salaried Employee
Regular Pay:

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Implement record keeping program by creating employee class
Reference No:- TGS03275833

Expected delivery within 24 Hours