Chain of Responsibility pattern
Introduction Chain of responsibility pattern states that each behaviour is to be extracted in its own class. This class are called handlers, furthermore these handlers are chained together in link. So that when the actual request comes in, this request travels the chain of handlers up until there is any handler that handles the request.…