A strategy design pattern is the most commonly used design pattern in computer programming.
In this post, we’ll start with a basic switch case statement and then we’ll modify the code into strategy design pattern.
Definition Observer design pattern defines a one-to-many dependency between the objects. When the object state changes, the observers are notified/updated about the change. Observer Pattern Terminology The observer pattern will have a subject, concrete subject, observer, and concrete observers. Subject: The subject is the interface that will be implemented by the concrete subject. Concrete subject: … Read more
A strategy design pattern is the most commonly used design pattern in computer programming.
In this post, we’ll start with a basic switch case statement and then we’ll modify the code into strategy design pattern.