Multiple choice technology architecture

Which pattern is used to allow different implementations of an algorithm or operation to be selected dynamically at runtime?

  1. Façade Pattern.

  2. Adapter Pattern

  3. Strategy Pattern.

  4. Factory pattern.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. It allows different implementations of an algorithm to be selected dynamically at runtime without changing the client code that uses the strategy, promoting flexibility and separation of concerns.