Strategy Pattern

Overview

Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Participants

Strategy

ConcreteStrategy

Context

Parameters

Sample usage method

Strategy operation

Context initialization

Create Pattern Links

Applicability

Use the Strategy pattern when