Practice: Behaviour patterns
Here are eight questions on the patterns from this section: Strategy, Observer, State, Command, Chain of responsibility, Template method, Iterator and visitor, the rarer patterns, and telling look-alikes apart. Each question gives you a prompt and asks which design you would choose, and when the simpler design is the better one. A reasoned "no pattern here" is often the strongest answer. The last question puts several patterns together on a small design.
How to use this page. Set a timer for each question, and answer out loud or on paper before opening anything. Open a hint only if you have been stuck for more than a minute. When you are done, open Check your answer, read the worked answer and the list of what a strong answer covers, and compare them with yours. If yours missed most of it, reread the guide the question practises and try again in a day or two. Where an answer counts wiring, it counts the lines a new class adds to Main, plus an import line in JavaScript and Python.