Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 3 ) Memory Limit ( MB ) : 5 1 2 , Execution Timeout ( ms ) : 2 0 0 0 You have

(3) Memory Limit(MB): 512, Execution Timeout(ms): 2000
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 4 steps in
this challenge and this system is divided into four
subsystems. You will implement subsystem i in step i
(1i4). The rough structure of the system is as
follows.
There are M 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 K
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 1 receives
the order and decides whether to accept it by checking
the stock quantity. (Step 1)
Subsystem 2 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 2) After the staff reports the completion of cooking,
subsystem 3 gives instructions on where to serve the
menu item, so the staff can serve it.(Step 3)
Customers can request to check out by tapping the
checkout button on the tablet at their table. When this
button is tapped, subsystem 4 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 4)
Note that the above description does not yet describe
the specifications of the data format or the specific
input/output 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 100 and 50.3 pieces of order information are given.
The first order is accepted since the quantity ordered
is 4 and the stock quantity of menu item 100 is 5. The
stock quantity of menu item 100 is now 1.
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 2
In step 2, the function to instruct the kitchen staff to
start cooking at the appropriate timing will be
Vemented. Subsystem 2 receives order accepted
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

Step: 3

blur-text-image

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Examine how employee benefits have changed in recent years!

Answered: 1 week ago

Question

Describe the appropriate use of supplementary parts of a letter.

Answered: 1 week ago