Software Design and Development :: CS 246

12 Prove

Template Method Pattern

Objectives

Introduction

The template method pattern is extremely useful when you have a sequence of steps to perform, but the exact details of those steps differ between subclasses.

Assignment

  1. Read this overview of the Template Method pattern.

  2. See this example showing the Template Method pattern being used.

  3. Take a look at the following Stack Overflow posts that discuss the difference between when to use the Template Method pattern vs the Strategy pattern:

Make sure to complete the accompanying quiz for this assignment on I-Learn.