Challenge: Chain of Responsibility Pattern
Explore how to implement the Chain of Responsibility design pattern to assign tasks to employees based on their skill levels. This lesson guides you through setting up a chain and managing work distribution dynamically, helping you strengthen behavioral pattern skills for coding interviews.
We'll cover the following...
We'll cover the following...
Problem statement
In this challenge, you have to use the chain of responsibility pattern to implement the functionality of assigning work to employees.
Each employee has a name and a level property. The level of an employee tells which task they can handle, that is, easy, medium, or hard. Hence, each employee is assigned a task depending on ...