this pattern is used when we have an algorithm or set of tasks that its use in multiple class and some of the step of this tasks/algorithms is identical and some of it not.
- ConcreteClass - class that extend the abstract class and implement some methods that should do
- AbstractClass - abstract class that include all methods of tasks and algorithm
AbstractClass |
---|
templateMethod() |
primitiveOperation1() |
primitiveOperation2() |
ConcreteClass |
---|
primitiveOperation1() |
primitiveOperation2() |