The Template Method design pattern solves problems like:
How can the invariant parts of a behavior be implemented once
so that subclasses can implement the variant parts?
How can subclasses redefine certain parts of a behavior
without changing the behavior's structure?
See Applicability section for all problems Template Method can solve. See Solution section for how Template Method solves the problems.