0% found this document useful (0 votes)
11 views11 pages

Shreyas f5

The document outlines a Restaurant Order Management System (RMS) that utilizes a queue data structure to efficiently manage customer orders. It includes software and hardware requirements, a problem statement for developing the system in C, and a sample program demonstrating queue operations for adding, processing, and displaying orders. The system aims to enhance restaurant operations by streamlining order management and improving customer service.

Uploaded by

pranavjella9999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views11 pages

Shreyas f5

The document outlines a Restaurant Order Management System (RMS) that utilizes a queue data structure to efficiently manage customer orders. It includes software and hardware requirements, a problem statement for developing the system in C, and a sample program demonstrating queue operations for adding, processing, and displaying orders. The system aims to enhance restaurant operations by streamlining order management and improving customer service.

Uploaded by

pranavjella9999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

RESTAURANT

ORDER
MANAGEMENT
SYSTEM
[Using Queue Data
Structure]
INTRODUCTION :

 A restaurant management system (RMS) is a


software solution designed to streamline and
optimize various aspects of restaurant
operations. It integrates several functions into a
cohesive system to enhance efficiency, improve
customer service, and boost profitability.This
system helps restaurants track customer orders,
manage their inventory, menu, tables, and
loyalty, and process payments. It can also
provide insights into customer preferences, sales
trends, and other data that can help owners
make better decisions.
PROBLEM STATEMENT :
 Develop a Restaurant Order
Management System using the queue
data structure in C to manage and
process customer orders efficiently.
The system should handle the addition
of new orders, processing of existing
orders, and display the current order
queue.
SOFTWARE REQUIREMENTS :

• Point of Sale (POS) System: Central


for processing transactions and
managing orders.
• Inventory Management: Tracks
ingredient levels and usage.
• Table Management: Organizes
seating and order flow.
• Customer Relationship Management
(CRM): Analyzes customer data for
targeted marketing.
• Reporting Tools: Provides insights on
sales and performance.
HARDWARE REQUIREMENTS :

• Touch-screen Monitors: For order


entry and management.
• Credit Card Readers: For secure
payment processing.
• Kitchen Display Systems (KDS):
Communicates orders to kitchen
staff.
• Receipt Printers: For customer and
kitchen order receipts.
• Cash Drawers: For cash transactions
PROGRAM :

#include <stdio.h> // Function to create a queue of given capacity


#include <stdlib.h> struct Queue* createQueue(unsigned capacity) {
#include <string.h> struct Queue* queue = (struct Queue*)malloc(sizeof(struct
Queue));
#define MAX 100 queue->capacity = capacity;
queue->front = queue->size = 0;
// Structure to represent an order queue->rear = capacity - 1; // rear is set to the last index
struct Order { initially
int orderNumber; queue->array = (struct Order*)malloc(queue->capacity *
// Function to create a queue of given capacity
char foodItem[50]; sizeof(struct Order));
struct Queue* createQueue(unsigned capacity) {
}; return queue;
struct Queue* queue = (struct Queue*)malloc(sizeof(struct
Queue));
// Queue structure to hold orders
queue->capacity = capacity;
struct Queue {
queue->front = queue->size = 0;
int front, rear, size;
queue->rear = capacity - 1; // rear is set to the last index
unsigned capacity;
initially
struct Order* array;
queue->array = (struct Order*)malloc(queue->capacity *
};
sizeof(struct Order));
return queue;
// Function to add an order to the queue struct Order order = queue->array[queue-
void enqueue(struct Queue* queue, int orderNumber, >front];
char* foodItem) { queue->front = (queue->front + 1) % queue-
if (isFull(queue)) { >capacity;
printf("Order queue is full! Cannot take more orders.\ queue->size = queue->size - 1;
n"); printf("Order %d (%s) has been processed
return; and removed from the queue.\n",
} order.orderNumber, order.foodItem);
queue->rear = (queue->rear + 1) % queue->capacity; return order;
queue->array[queue->rear].orderNumber = }
orderNumber;
strcpy(queue->array[queue->rear].foodItem, // Function to display all orders in the queue
foodItem); void displayQueue(struct Queue* queue) {
queue->size = queue->size + 1; if (isEmpty(queue)) {
printf("Order %d (%s) has been added to the queue.\n", printf("No orders in the queue.\n");
orderNumber, foodItem); return;
} }
printf("Orders in the queue:\n");
// Function to remove an order from the queue for (int i = 0; i < queue->size; i++) {
struct Order dequeue(struct Queue* queue) { int index = (queue->front + i) % queue-
if (isEmpty(queue)) { >capacity;
struct Order emptyOrder = {-1, ""}; printf("Order %d: %s\n", queue-
printf("Order queue is empty! No orders to process.\ >array[index].orderNumber, queue-
n"); >array[index].foodItem);
// Main function to demonstrate the queue operations
case 2:
int main() {
struct Queue* queue = createQueue(MAX); dequeue(queue);
break;
int choice, orderNumber; case 3:
char foodItem[50]; displayQueue(queue);
break;
do { case 4:
printf("\nRestaurant Order Management System\n"); printf("Exiting...\n");
printf("1. Add Order\n");
break;
printf("2. Process Order\n");
printf("3. Display Orders\n"); default:
printf("4. Exit\n"); printf("Invalid choice! Please enter a
printf("Enter your choice: "); valid option.\n");
scanf("%d", &choice); }
} while (choice != 4);
switch (choice) {
case 1: // Free the allocated memory
printf("Enter order number: ");
free(queue->array);
scanf("%d", &orderNumber);
printf("Enter food item: "); free(queue);
scanf(" %[^\n]%*c", foodItem); // Read string
with spaces return 0;
enqueue(queue, orderNumber, foodItem); }
break;
OUTPUT :
Restaurant Order Management System
1. Add Order
2. Process Order
3. Display Orders
4. Exit
Enter your choice: 1
Enter order number: 1 Restaurant Order Management System
Enter food item: chapathi with paneer 1. Add Order
Order 1 (chapathi with paneer) has been added to2. Process Order
the queue. 3. Display Orders
4. Exit
Restaurant Order Management System Enter your choice: 1
1. Add Order Enter order number: 3
2. Process Order Enter food item: fruit salad
3. Display Orders Order 3 (fruit salad) has been added to the queu
4. Exit
Enter your choice: 1
Enter order number: 2
Enter food item: masala onion dosa
Order 2 (masala onion dosa) has been added to the
queue.
Restaurant Order Management System
1. Add Order Restaurant Order Management System
2. Process Order 1. Add Order
3. Display Orders 2. Process Order
4. Exit 3. Display Orders
Enter your choice: 1 4. Exit
Enter order number: 4 Enter your choice: 2
Enter food item: soft drinks Order 1 (chapathi with paneer) has been processed
and
Order 4 (soft drinks) has been added to the removed from the queue
queue.

Restaurant Order Management System


1. Add Order
2. Process Order
3. Display Orders
4. Exit
Enter your choice: 1
Enter order number: 5
Enter food item: ice cream
Order 5 (ice cream) has been added to the queue.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy