Programmer-defined classes
If you were going to program a payroll system with both hourly and salaried employess, you might define three classes: Employee, SalariedEmployee and HourlyEmployee.
- What would be some of the properties of an Employee?
- What would be some of the properties you would add for a SalariedEmployee?
- What would be some of the properties you would add for an HourlyEmployee?
- Would the class Professor inherit the properties of the class Person, or would the class Person inherit the properties of the class Professor?