DESIGN-PATTERNS Course

Chain of Responsibility

Go back

Let's say a client wants something. We are going to ask each element in a list of classes that we defined, if they can do it.

  • ✅ : flexibility, classes are less linked with each other
  • 🚫 : ...

Example

Here is an example on tutorialspoint.