2. Introduction
• Take a look at the definition of a template……
• Template is a preset format, used as a starting point for a
particular application so that the format does not have to
be recreated each time it is used.
• Template Method Pattern defines a sequence of steps of
an algorithm.
• The subclasses are allowed to override the steps but not
allowed to change the sequence.
3. RealTimeExample-01
Template Method [Build
a House]
1)Building Foundation
2)Building Pillars
3)Building Walls
4)Building Windows
Concrete House
Wooden House
Foundation
Pillars
Walls
Windows
template is a preset format, used as a starting point for a particular application so that the format does not have to be recreated each time it is used.