Template Method

Define the skeleton of an algorithm in an operation, deferring some steps to
subclasses. Template Method lets subclasses redefine certain steps of an algorithm
without changing the alorithm's structure.
Applicability
- Need to implement the invariant parts of an algorithm, but leave some details to subclasses
- Need to factor out common behavior in groups of subclasses
- Need to control subclass extensions
Consequences
- Fundamental technique for code reuse
- Often called hooks
- Template methods may be optional or required