> Design Patterns > Behavioral Design Patterns

Behavioral Design Patterns

Behavioral design patterns characterize the ways in which classes or objects interact and distribute responsibility. These are the patterns comes under Behavioral design patterns.

  • Chain of responsibility pattern is used to provide a chain of objects to handle the request.
  • Command pattern is used to encapsulate the request as an object.
  • Interpreter pattern is used to define a problem in simple language and resolving it through interpreting its simple sentences.
  • Iterator pattern is used to access and traverse an aggregate object without exposing its internal structure.
  • Mediator pattern is used for controlling the interaction between different objects.
  • Memento pattern is used to capture the state of an object without violating encapsulation, so that if required then it can be returned to its previous state.
  • Observer pattern is used to notify all the objects to update themselves when an object state gets changed. This is also known as Publish-Subscribe.
  • State pattern is used to change the behavior of object based on current state of object.
  • Strategy pattern is used for selection of algorithm from a family of algorithms based on context or data.
  • Template Method pattern is used to get some steps of algorithm implemented in subclass.
  • Visitor pattern is used to perform operation on elements of an object structure.


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books "C In Depth", "Data Structures Through C In Depth". He has 18+ years experience in industry and worked on architecture and design of multiple products. This article is from his courses on Design Patterns.