Design-Patterns

This repostitory contains design-pattern examples used in the book Head First Design Patterns.

Design Principles

OO-Basics

  • Abstraction
  • Encapsulation
  • Polymorphism
  • Inheritance

OO-Principles

  • 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.

Sources

  • Freeman, E., Robson, E., Bates, B., & Sierra, K. (2008). Head first design patterns. " O'Reilly Media, Inc.".