Multiple choice technology programming languages

You are a Computer Science lecturer at a top University. You are giving a presentation of a new piece of software you have written. Basically you have written the next generation spell checker, the reason yours is so good is that it can learn the common typing mistakes of an individual user. You have already sold licenses to many major software vendors and plan to retire in the Sun. However before you go they all require slight changes in the logic to suit their individual needs. What design pattern will help you slightly change the logic in a class to be used in many applications?

  1. Strategy

  2. Adapter

  3. Template Method

  4. Interpreter

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Template Method defines algorithm skeleton in base class, letting subclasses override specific steps without changing structure. This lets vendors customize spell-checking logic while keeping core algorithm unchanged. Strategy encapsulates entire algorithms, while Template only varies steps within a fixed algorithm structure.