Which behavioral design pattern enables selecting an algorithm’s implementation dynamically at runtime from a family of interchangeable algorithms?
AState Pattern
BCommand Pattern
CMediator Pattern
DStrategy Pattern
Explanation
The Strategy pattern encapsulates alternative algorithms inside separate classes and makes them interchangeable at runtime.

No Comments