In this problem, you will build three small classes based on
the person. The three classes are: Employee, HourlyEmployee, and
SalariedEmployee. Implement this program using Python.
An employee has an
employee’s name (inherited from the class person), an annual salary, a hired
date that gives the year, month, and date that the employee got hired, and a
social security number. Choose appropriate data types for this information.
HourlyEmployee and SalariedEmployee are derived from Employee. The difference
between HourlyEmployee and SalariedEmployee is the way that the salary is
calculated. For HourlyEmployee, salary = number of hours worked * hourly rate;
for SalariedEmployee, salary = annual salary + bonus. To accommodate the
calculation of salary, HourlyEmployee and SalariedEmployee need additional data
members, including number of hours worked, hourly rate, or bonus.
Program design requirement:
1. Be sure your classes have a reasonable set of
constructors, accessor methods, and mutator methods so that object states can
2. Be sure to
demonstrate method overloading and method overridden in your classes.
3. Be sure to
demonstrate the appropriate use of access modifiers for class and its members.
4. You may use
5. Be sure to
document your source code
Source code for the
Source code for testing
program (see example in c++)