Extract Superclass

You have two classes with similar features.

Create a superclass and move the common features to the superclass.

image/svg+xml Department getTotalAnnualCostgetNamegetHeadCount Employee getAnnualCostgetNamegetId Department getAnnualCostgetHeadCount Employee getAnnualCostgetId Party getAnnualCostgetName

inverse of Collapse Hierarchy

Naming: In the ruby edition this refactoring is called "Introduce Inheritance".