I. Overview of the pattern
The touch-board approach (Template method) pattern is a very simple and often used design pattern. Create a parent class and leave one or more of these methods to the subclass to implement, which is actually using the touch-board mode. The so-called touch plate model can be interpreted as follows: "Define an algorithm in a class, However, some details of this algorithm are left to the subclass to implement. In other words, the base class is an abstract class, so you're using a simple form of touch-board mode.
One step closer to understanding this: "Prepares an abstract class, implements part of the logic as a concrete method, and then declares some abstract methods to force the subclass to implement the remaining logic. Different subclasses can implement these abstract methods in different ways, thus having different implementations of the remaining logic."
Two. Pattern Intent
Extracts the base part of a class into a base class so that it does not have to recur in several derived classes.
Three. Pattern UML diagram (The following image is transferred from http://www.dofactory.com/)
Four. Pattern structure and participant