For this project, write a C program that will implement a food ordering system used in a fast food restaurant.

computer science

Description

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 when 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 served. The program must use a linked list to implement the queue-like data structure.


The linked list is to maintain 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 orders 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 in 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 already 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 food 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 needs to be present at the restaurant. 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).


Related Questions in computer science category