Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 3 ) Memory Limit ( MB ) : 5 1 2 , Execution Timeout ( ms ) : 2 0 0 0 You have
Memory LimitMB: Execution Timeoutms:
You have been assigned to develop a tablet ordering
system for a restaurant. This system will handle
information from tablets on each table and in the kitchen
and manage accounting information. There are steps in
this challenge and this system is divided into four
subsystems. You will implement subsystem in step
The rough structure of the system is as
follows.
There are menu items served in the restaurant. Each
menu item has a specific menu ID initial stock
quantity, and price, and this set of information for each
menu item is called menu item information. All menu
items in the restaurant are served to customers by
heating packaged frozen food in a microwave oven.
This restaurant has a kitchen and some tables. Each
table is assigned a table ID and a table's tablet is set
on it Staff members in the kitchen operate
microwaves.
Customers place orders and check out by using the
tablet on the table. Placing an order is done by the
customer entering the menu ID and the quantity of this
menu item ordered into the tablet. Subsystem receives
the order and decides whether to accept it by checking
the stock quantity. Step
Subsystem continuously monitors the availability of
microwaves and instructs the kitchen staff to start
cooking accepted orders at the appropriate time. When
the instructions are sent, the staff begins heating the
food in the microwave oven. The staff reports to the
subsystem when the cooking is complete. Step After the staff reports the completion of cooking,
subsystem gives instructions on where to serve the
menu item, so the staff can serve itStep
Customers can request to check out by tapping the
checkout button on the tablet at their table. When this
button is tapped, subsystem receives checkout request
information. Then, the subsystem checks whether all
menu items the customer ordered have been served. If
they have, the subsystem shows the total price of
ordered menu items. Otherwise, it displays "please wait"
on the tablet. Step
Note that the above description does not yet describe
the specifications of the data format or the specific
inputoutput methods. Based on the detailed
specifications below, implement a program that contains
all subsystems.
How to create the program
Input to the program is given via the standard input.
The newline code is Input and Output Examples
Input
Output
There are two menu items on the menu, having the menu
IDs and pieces of order information are given.
The first order is accepted since the quantity ordered
is and the stock quantity of menu item is The
stock quantity of menu item is now
The second order is not accepted since the stock
quantity is insufficient. Output the sold out message
to the table's tablet. The stock quantity doesn't
change with this order.
The third order is accepted since the stock quantity
didn't change in the second order.
Step
In step the function to instruct the kitchen staff to
start cooking at the appropriate timing will be
Vemented. Subsystem receives order accepted
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started