September 2020
Intermediate to advanced
653 pages
10h 37m
English
This chapter covers the Template Method pattern.
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 algorithm’s structure.
Using this pattern, you begin with the minimum or essential structure of an algorithm. Then you defer some responsibilities to the subclasses. As a result, the derived class can redefine some steps of an algorithm without changing the flow of the algorithm.
Simply, this design pattern is useful when you ...
Read now
Unlock full access