Consider the inheritance hierarchy in which a person class


Question: Consider the inheritance hierarchy in which a Person class has a Part time Employee subclass, which in turn has a New Fulltime Employee subclass, which has a Tenured Full time Employee subclass. When asked to justify this hierarchy the designer of it gave the following two reasons:

• Every employee is a person.

• The three categories of employees are identical except each subclass has more benefits than its superclass. For example, part time employees have a few benefits, for example, salary, but new fulltime employees get more, for example, health insurance, and tenured fulltime employees get even more, for example, stock options and dental insurance.

What do you think of this hierarchy? Evaluate it based on the discussion in this chapter. Come up with a better design for these categories of employees.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Consider the inheritance hierarchy in which a person class
Reference No:- TGS02578151

Expected delivery within 24 Hours