📞 0339-0387701 (WhatsApp) Contact

« Back to Software Engineering (NCCIA)

Which design pattern defines a family of interchangeable algorithms?

A. Strategy Pattern ✅
B. Singleton Pattern
C. Decorator Pattern
D. Adapter Pattern

Correct Answer: A. Strategy Pattern

Explanation

  • Strategy lets an algorithm be selected at runtime
  • It encapsulates each algorithm so it can vary independently.