This repostitory contains design-pattern examples used in the book Head First Design Patterns.
- Abstraction
- Encapsulation
- Polymorphism
- Inheritance
- Identify the aspects of your application that vary and separate them from what stays the same.
- Programm to an interface, not an implementation
- Favor composition over inheritance.
The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
- Freeman, E., Robson, E., Bates, B., & Sierra, K. (2008). Head first design patterns. " O'Reilly Media, Inc.".