Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

screenshots that indicates how your system works PROBLEM You are to implement an automated restaurant system utilizing the Command design pattern, minimally consisting of the

screenshots that indicates how your system works
PROBLEM
You are to implement an automated restaurant system utilizing the Command design pattern, minimally
consisting of the following three commands. You will then extend this basic system in any way that you
choose to demonstrate the use of additional design patterns.
Display menu
Submit Order
Display tab
SCENARIO (of the basic system)
In the basic system, we assume that all orders are from the same table (i.e., there is only one table in
the restaurant). Therefore, a tab is generated by simply totaling all of the ordered items, and tabs are
not stored.
The menu of the basic system will consist of just main entrees. It will not include appetizers, desserts,
drinks, etc. The information for each entre will just be the name of the dish ("Roast Beef", "Chicken
Korma", "Jiaozi", etc.) and the price.
APPROACH
You should implement the Command design pattern. This includes the following:
Text-based user interface
Systeminterface class
Invoker class
Command interface
Command classes (one for each command)
Aggregator class
Menu class
Menultem Class
Orders class
Orderitem Class
Tab class
The user interface should just be a text-based numbered list of options, implemented in the main
method. (It can be a GUI if you desire and are familiar with the development of GUls, but no extra points
will be given for this).
The Systeminterface can be a class of all static methods - one for each of the three commands of the
user interface, if it does not have any state in your extension of the program.
The Aggregator class maintains references to the Menu object and the Orders object. It should provide a
getter method for retrieving the Menu and Orders objects (no setters are needed). The Menu and
Orders classes store a collection of Menultem and Orderltem objects, respectively. A Menultem object|
will store the menu item #, the description, and its cost. An Orderitem object will store an order by its
item number only (
The Invoker class has methods cooresponding to the methods of the system interface. Each method
simply creates a Command object of the appropriate Command class (constructed with a reference to
the Aggregator object), calls its execute method, and returns the results (as a single object) back to the
system interface. (Execute methods should not be passed any parameter values - any values needed are
passed to the constructor.)
A tab will be constructed from the Tab class containing all of the ordered items, returned as an array of
strings for the user interface to display. Note that a tab needs information from both the Menu and the
Orders objects. (The Orders object indicates what menu items were ordered, and the Menu class has the
description of each item to include in the Tab.)
EXTENSION OF THE BASIC SYSTEM
You are to extend the design and capabilitities of the program in any ways that you wish, by using the
design patterns we learned in the class. The intent is to demonstrate the significant and appropriate use
of design patterns. In additional to the command design pattern, at least TWO other design patterns
need to be used/identified from your system.
Following are some ideas on how the system may be extended:
Capability of maintaining orders (and tabs) for multiple tables.
Capability of maintaining a queue of waiting groups of different size to be seated, and
automatically seated as people leave tables (triggered when tab paid).
Capability of maintaining an inventory of items (tomatoes, etc.) and their depletion as
orders are prepared, which may have various effects (e.g., what is offered on the menu,
the price of certain items, the options offered for certain items)
Capability of "dynamic pricing" in which menu items change price based on factors such as
how well certain items is selling.
Capability of generating various reports (sales, inventory, etc.)
Capability of manager adjusting a given table's tab based on some factors.
Anything else you can think of!
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students explore these related Databases questions

Question

What role does insurance play in bailment?

Answered: 3 weeks ago