Strategy Pattern

The Strategy pattern is a behavioral design pattern in object-oriented programming (OOP) that allows you to define a family of interchangeable algorithms and encapsulate each one as a separate class. It enables the algorithm to vary independently from the clients that use it, making it easy to switch between different algorithms at runtime.

The main idea behind the Strategy pattern is to create a set of algorithms that implement a common interface or follow a shared contract. The client code interacts with these algorithms through the interface, without needing to know the specific implementation details