In the context of the Strategy design pattern, strategies are often implemented using _____?

  • Inheritance
  • Composition
  • Polymorphism
  • Encapsulation
In the Strategy design pattern, strategies are often implemented using composition. This allows different strategies to be encapsulated in separate objects that can be switched at runtime, promoting flexibility and modularity in the software design.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *