Part 1 of 7 · 1 min read
Why this page comes last in Level 4
In this module you will
- Start from a design problem and name the pattern that fits, with a reason.
- Tell look-alike patterns apart: strategy and state, decorator and adapter, command and strategy.
- Combine several patterns in one small design without overbuilding.
- Say when no pattern is the right answer.
- Name the patterns in this course and the ones left out, with what each one is for.
Modules 1 to 9 each taught one pattern. In a design round the question never says "use the strategy pattern". It describes a need, and you must pick. This page is a decision guide built from the problems the patterns solve. The sources are "Design Patterns" (GoF) chapters 1 and 5 and "Head First Design Patterns" (HF), together with the principles of Level 2. Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.