How does the Chain of Responsibility design pattern decouple the sender and receiver objects?

  • By making the sender and receiver objects tightly coupled
  • By having a single object handle all requests
  • By allowing multiple objects to handle a request in a chain
  • By making the sender object directly call the receiver object
The Chain of Responsibility design pattern decouples the sender and receiver objects by allowing multiple objects to handle a request in a chain. Each handler in the chain decides whether to process the request or pass it to the next handler. This decoupling ensures that the sender doesn't need to know the specific receiver and can be more flexible.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *