1. The template method defines the skeleton of an algorithm in an operation, and delays some steps to the subclass. The template method allows the subclass to redefine certain steps of an algorithm without changing the structure of an algorithm. Features: when using the template method, you can move the unchanged behavior to the superclass, removing repeated code in the subclass to reflect its advantages. It provides a good code reuse platform. Applicability: When immutable and variable behaviors are mixed in the implementation of sub-classes of methods, immutable behaviors will be repeated in sub-classes. At this time, we can consider using the template method to move these actions to a single place, so as to help the subclass get rid of the entanglement of repeated unchanged behavior. Example, the class has to be modified. Not only do they have to be modified, but some are nearsighted and often make mistakes, which leads to incorrect answers. Students answer questions one by one. Later, the school had money and bought a printing press. The teacher engraved the template. After the correction, he copied the paper. In this way, the students saved the trouble of copying the questions. At the same time, everyone had the same paper, there will be no more CC errors. Students only need to fill in the correct answer and submit the paper. The distribution of this exam is first carried out by the teacher to engrave the template, print the paper, and leave the answer to the students. What are the template methods? II. In the template method, the class chart generally contains the abstract method PrimitiveOperation in the TemplateMethod method of the parent class, while the PrimitiveOperation method is implemented by polymorphism in the subclass, this completes the partial redefinition of the algorithm.