Juliet C. answered 03/19/23
PhD in Computer Science with 8+ Years of Teaching Experience
I would start by identifying what belongs where to see what makes sense for a superclass for subclasses to inherit from. Here's one way to work that out in a table with categories of employees and fields and methods, making some assumptions about how staff, contractors, and volunteers fit in (sorry the table got cut off in the display because of Wyzant's width limit):
Based on the table, I see that I have decided that first name, last name, and display personal info are common for all categories. This would be the upper-most class and I would probably call it Person. A volunteer would be represented as a Person object. For non-volunteers, the common fields in the table are SSN number, home address, hire date, rehire date, termination date, and employment status. I would probably put that in an Employee class that is a subclass of Person. Subclasses of Employee could be Full-Time and Part-Time, with Full-Time having the "process salaried payroll" method and Part-time having the "process part-time payroll" method. Based on the way I made decisions in the table, it looks like I would have a subclass of Full-Time called Athlete that would have all of the athlete fields and methods: batting average, team history, and output team history. Staff and executives could be represented as Full-Time objects, and contractors could be represented by Part-Time objects.
Please note that my answer is subject to my interpretation of the question, without having additional explanation about the categories people in the payroll system.