May 2022
Intermediate to advanced
678 pages
11h 48m
English
This chapter covers the Strategy pattern. It is also known as the Policy pattern.
It defines a family of algorithms, encapsulates each one, and makes them interchangeable. The Strategy pattern lets the algorithm vary independently from the clients that use it.
A client can select an algorithm from a set of algorithms dynamically at runtime. This pattern also provides a simple way to use the selected algorithm.
You know that an object can have states and behaviors. And some of these behaviors may vary among ...
Read now
Unlock full access