April 2019
Intermediate to advanced
646 pages
16h 48m
English
Template helps design a generic algorithm by defining abstract steps, which are implemented in subclasses. This pattern uses the Liskov Substitution Principle (LSP), which is defined by Wikipedia as follows:
In other words, an abstract class can define how an algorithm works through steps that are implemented in concrete classes. The abstract class can also give a basic or partial implementation of the algorithm, and let developers override its parts. For instance, some methods of the Queue class in the queue module can be overridden to make its behavior vary.
Let's ...