Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Refactoring with Inheritance

In this lab, we’ll practice using inheritance to refactor code to avoid code duplication.

Consider the Employee interface found in edu.grinnell.csc207.inheritance and associated classes that represent employees in an organization. Using inheritance, refactor this code to eliminate redundancy while capturing the hierarchical nature of the employee structure.