Design Patterns, Made Simple
Source on GitHub

Strategy

Keep checkout unchanged while swapping the pricing algorithm.

Object interactions Ready

When to use it

Trade-offs

View Java example