Top "Strategy-pattern" questions

The Strategy pattern (also known as the policy pattern) is a design pattern whereby an algorithm's behavior can be selected at runtime.

Using Factory with Strategy design pattern

Okay, so I have been given an assignment where I am asked to use both the Strategy and Factory design …

design-patterns uml factory-pattern strategy-pattern
Strategy Pattern and Dependency Injection using Unity

I am finally getting my feet wet with Dependency Injection (long overdue); I got started playing with Unity and run …

c# dependency-injection unity-container ioc-container strategy-pattern
C++ Strategy pattern

In the past, I have seen the strategy pattern explained as a mechanism which allows the user of a function/…

c++ design-patterns strategy-pattern
Modifying if-else to strategy pattern

I have the following if-else branch in java. if (str.equals("a")) { A;} else if (str.equals("b")) { B;} else …

java if-statement strategy-pattern
Dependency Injection and the Strategy Pattern

There is an enormous amount of discussion on this topic, but everyone seems to miss an obvious answer. I'd like …

c# .net dependency-injection ioc-container strategy-pattern
Difference between Strategy pattern and Delegation pattern

What is the difference between Strategy pattern and Delegation pattern (not delegates)?

design-patterns delegation strategy-pattern
Node.js - create object of class name specified in variable

I have a class hierarchy like: |-> Square AbstractShape -+-> Circle |-> Triangle Now, I'd like …

javascript node.js strategy-pattern
Best way to do this generic abstract class in c#?

I know I'm not doing this right, but I also know there is a way to do this. I'm trying …

c# generics refactoring abstract-class strategy-pattern
Differences between Strategy Pattern and Inheritance

There is a same concept for Strategy Pattern and Inheritance, so I can implement Strategy Pattern with Inheritance that sounds …

c++ inheritance design-patterns strategy-pattern object-oriented-analysis