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.

  1. What would be some of the properties of an Employee?
  2. What would be some of the properties you would add for a SalariedEmployee?
  3. What would be some of the properties you would add for an HourlyEmployee?
  4. Would the class Professor inherit the properties of the class Person, or would the class Person inherit the properties of the class Professor?


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.