Behavioural Patterns

Memento Pattern

  • Undo in text editor

Observer Pattern

  • WeatherStation broadcasting temperature to DisplayDevice

Strategy Pattern

  • PaymentService processing Payments with PaymentStrategy

Command Pattern

  • Bold, Italic Command Buttons – Generic button

Template Pattern

  • DataParser – JSONParser, CSVParser

Iterator Pattern

  • Java Iterable – .hasNext(), .next()

State Pattern

  • TransportationService – ETA/Directions based on TransportationMode

Mediator Pattern

  • ChatUser sending messages to other ChatUsers in a ChatRoom

Leave a comment