static void Main(string[] args) { // Create a teacher Teacher teacher = new Teacher(); teacher.Name = "Tom"; // Create a manager Manager manager = new Manager(); manager.Name = "Jerry"; // Create a director Director director = new Director(); director.Name = "Susan"; // Create an Organizational Chart, i.e. the Responsibility Chain. teacher.Boss = manager; manager.Boss = director; // Create a request that can be handled by a teacher. Request firstRequest = new Request(); firstRequest.Description = "The parent requests to have a copy of their kid's daily status.\n"; firstRequest.Level = ResponsibilityLevel.Low; Console.WriteLine("Request Info: " + firstRequest.Description); // Send the request teacher.ProcessRequest(firstRequest); Console.WriteLine(); // Create a request that can be handled by a manager. Request secondRequest = new Request(); secondRequest.Description = "The parent requests to pay the tuition fees.\n"; secondRequest.Level = ResponsibilityLevel.Medium; Console.WriteLine("Request Info: " + secondRequest.Description); // Send the request teacher.ProcessRequest(secondRequest); Console.WriteLine(); // Create a request that can be handled by the director only. Request thirdRequest = new Request(); thirdRequest.Description = "Mr. Jacques requests to schedule a visit for all his kids.\n"; thirdRequest.Level = ResponsibilityLevel.High; Console.WriteLine("Request Info: " + thirdRequest.Description); // Send the request teacher.ProcessRequest(thirdRequest); Console.ReadKey(); }