Multiple choice technology architecture

The -------------- Method pattern should be used to implement the invariant parts of an algorithm once and leaves it up to subclasses to implement the behavior that can vary

  1. Strategy Pattern.

  2. Template Pattern.

  3. Observer Pattern.

  4. None of the above.

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

The Template Method pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses. It implements invariant parts of an algorithm once in the base class while allowing subclasses to override the variable parts. This promotes code reuse and enforces algorithm structure.