Template Method
← Back to Behavioral Patterns
Define algorithm skeleton, let subclasses fill steps. Define the skeleton of an algorithm in a method, deferring some steps to subclasses. Subclasses can redefine certain steps of an algorithm without changing the algorithm’s structure.
Key Properties
Related
- Strategy (delegation vs inheritance)
- Factory Method (template method for creation)