Design Patterns Explained
  • Getting Started
  • SOLID Principles
    • Single Responsibility Principle
    • Open / Closed Principle
    • Liskov Substitution Principle
    • Interface Segregation Principle
    • Dependency Inversion Principle
  • Design Patterns
    • Creational Patterns
      • Abstract Factory Pattern
      • Builder Pattern
      • Factory Pattern
      • Prototype Pattern
      • Singleton Pattern
    • Behavioral Patterns
      • Chain Of Responsibility Pattern
      • Command Pattern
      • Interpreter Pattern
      • Iterator Pattern
      • Mediator Pattern
        • Example 1
      • Memento Pattern
      • Observer Pattern
      • State Pattern
      • Strategy Pattern
        • Example 1
      • Template Method Pattern
      • Visitor Pattern
    • Structural Patterns
      • Adapter Pattern
      • Bridge Pattern
      • Composite Pattern
      • Decorator Pattern
      • Facade Pattern
      • Flyweight Pattern
      • Proxy Pattern
  • Roadmap
Powered by GitBook
On this page
  • Mapping The Example to Structure
  • UML
  • Files

Was this helpful?

  1. Design Patterns
  2. Behavioral Patterns
  3. Strategy Pattern

Example 1

PreviousStrategy PatternNextTemplate Method Pattern

Last updated 4 years ago

Was this helpful?

The example is a Notifier Class that sends a notification to a certain platform once and error count threshold is reached.

Mapping The Example to Structure

  • ErrorNotifier :: Context

  • SlackNotifier :: Concrete Strategy

  • NotificationStrategy :: Abstract Strategy

UML

Files

Source Code
Tests
Example 1 UML Diagram