Design patterns·Who calls whom, and when
the base class runs the five steps in order and leaves two of them abstract for you to write.
Template method
Also calledtemplate method pattern, skeleton algorithm
Defining the skeleton of an algorithm in a base class and deferring specific steps to subclasses. It is the inheritance-shaped sibling of strategy: same goal — vary part of an algorithm — with the variation bound at compile time by subclassing rather than at runtime by composition. It is the most common accidental producer of a fragile base class, because the ordering and the calls between steps become an unwritten contract.