The code for AFrame is an example of what is called the Template Method Pattern. This design pattern is used to expresses an invariant and concrete behavior that consists of calls to one or more abstract methods. An abstract method represents a variant behavior. In other words, the template design pattern is a means to express an invariant behavior in terms of variant behaviors. We shall see this pattern used again in expressing sorting algorithms.
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://firstname.lastname@example.org
Note: The code for the classes AFrame, FrameA, FrameAB, and FrameAC are available in the glossary.