Payroll with Inheritance
Our payroll program could make use of inheritance if we had different classes of employees: exempt employees, nonexempt
employees, and contract employees
- They all share basic characteristics such as getting paid (albeit via different algorithms), withholding, having to
accumulate year-to-date numbers for numerous categories.
- But they have different handling regarding payment calculations, benefits, dependents, etc.
- Exempt employees get a monthly salary, while nonexempt get a wage * hours,
contract employees are handled similarly to nonexempt, but cannot have
benefits or dependents.
This would leave us with an inheritance scheme as follows:
Note that a scheme with
also be a reasonable approach