Generalize Behavior With Inheritance | |||
| |||
Context: Generalize Behavior With Inheritance is one of the routes to follow when a variation of an existing abstraction needs to be introduced. Somewhat strange about this refactoring is that it is triggered by variation rather than duplication. An alternative route to follow when inserting a new variation is to Introduce Duplication by copy-paste-modifing the existing code and factor out the duplication afterwards by Eliminate Duplication By Inheritance. |