GoF Statement of Intent:![]() |
Define the skeleton of an algorithm in a method, deferring
some steps to subclasses. Template Method lets subclasses redefine
certain steps of an algorithm without changing the algorithm's structure. |
Brief Overview:![]() |
Defines the program skeleton of an algorithm, but one or more of the algorithm
steps are overridden by subclasses that provide their own concrete implementation.
A parent class is created that provides the abstract interface and defines the
basic steps of the algorithm while the subclasses handle the specifics. |
UML Diagram: |
![]() |