Using the design pattern of chain of responsibility and inJava
Restaurant food ordering (e.g. chain of responsibility). Acustomer tells to cashier which food to order. The customer willpay the amount shown on the front-end terminal. After payment andthe receipt (with order number#) is printed, the order is processedby the back-end cook. After a moment of waiting, the customer seesthe order number# on the screen matches with the one on thereceipt, she will take the food plate and leave the waitingline.
(1) First, briefly explain in your words how such a designpattern is used in your implementation.
(2) Then provide the source code AND necessary comments in thecode, in a single document (for grading purpose only).
(3) In addition, draw the class diagram that shows the classes,relationships, and included attributes and methods. Informationfrom the class diagram should be consistent with your programmingcode structure.
Make sure your program is executable without any unfixed bugs.The programming language must be object-oriented and yourimplementation must be object-oriented too (in other words, youcannot use C++ to write all lines of code in one main()function).
Answer to Using the design pattern of chain of responsibility and in Java Restaurant food ordering (e.g. chain of responsibility)….