Question
pm Fast Food Order Management For this project , write a C program that will implement a food ordering system used in a fast food
pm
Fast Food
Order
Management
For this
project
, write a C program that will
implement a
food ordering system used in a fast
food
restaurant.
This restaurant only serves burgers and salads and w
hen people want to
order
food
, they give their name and
food choices
to the
cashier
and then wait until those in front of
them have been s
erved
.
The program
must
use
a linked list
to implement the queue
-
like data
structure
.
The linked list is to mainta
in the following information for each group that is waiting:
name (we assume a maximum name length of 30 characters)
food items (number of burgers and salads ordered)
in
-
restaurant
status
:
whether the group has called ahead or is waiting in the restaurant
The system allows you to call and put your order in before you arrive at the restaurant, but it
does not take
order
s
for a specific time and date (i.e.
4 burgers and 2 salads
for 7pm on
Saturday)
. Note: these call
-
ahead groups will still need to check i
n when
they arrive
,
so the
cashier
knows they are waiting in the restaurant.
Groups are added
to the
order
list when they call
-
ahead or when they arrive at the restaurant.
Groups are always added to the end of the
order
list.
The system will require that each name
used be unique. So when a group is added to the
order
list
, the
system
must make sure that no
other group is alread
y using that name.
The restaurant staff working in the kitchen have
a
steady speed in preparing food and they work
on one order at a time. On average, preparing a salad takes 5 minutes while burger takes 10
minutes.
The system needs to track how many fo
od items have been ordered and provide customers with
an estimated wait time.
You can assume that every time an order is being called, it will go to the first group in line
.
However, in order to pick up the food
,
the group need
s
to be present at the resta
urant. If they are
not, then the system will call the next eligible group for pick up (an eligible group is a group that
the
number of burgers and salads they ordered is less than or equal to prepared order).
The commands use
d by this system are
listed b
elow and are to come from standard input
.
Your
program is to prompt the user for input and display error messages for unknown commands or
improperly formatted commands.
Note that the name of the group
when given will be
given as
the last item on the
inp
ut
line. The name of the group may contain white space characters in the
middle of the name but not at the beginning or end of the name.
Each command given must
display some information about the command being performed.
Code to implement this
interface
is provided in the program
proj4base
.c
.
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