Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the primary purpose of the Strategy Pattern?
Think about how it allows flexibility in algorithm usage.
What does a Strategy interface do?
Recall the role of abstraction in design patterns.
What purpose does the Strategy Pattern serve?
Think about flexibility in a programming context.
True or False: The Context class can hold multiple Strategy instances simultaneously.
Consider how a context is designed to operate.
Design a notification system using the Strategy Pattern where users can choose to be notified via email or SMS. Describe your classes and their interactions.
Think about how users select their desired method of notification.
Create a game where different characters can adopt different combat strategies based on their enemy. Use the Strategy Pattern to design this.
Consider how to switch strategies dynamically depending on the enemy type.
4 more questions in this section. Enroll free to practise them all.
Enroll free