This chapter will show you two important techniques. First, you will learn to use a template method. Why is this important? It is important because template methods are one of the fundamental techniques for code reuse. Suppose you follow a multistep algorithm to achieve a task. Using a template method, you can redefine some of these steps (but not all the steps) of the algorithm without altering the calling sequence of these steps.
This chapter starts with a demonstration that ...