Certificate Merged
Certificate Merged
Signature
ACKNOWLEDGEMENT
HARDWARES
1) Desktop Computer
2) Mobile Phone
SOFTWARES
1) Python
2) SQL
3) Python mysql connector module
INTRODUCTION
The Restaurant Management System is a
software solution designed to streamline the
process of managing and operating a
restaurant. This system aims to automate and
simplify key restaurant operations, making it
more efficient and user-friendly for both
customers and restaurant staff.
The primary objective of the system is to
handle tasks such as managing the menu,
processing customer orders, recording
feedback, and generating bills, all while
ensuring a smooth and responsive experience
for the user. This system leverages MySQL as
the backend database to store critical
information related to the restaurant's menu,
customer orders, and feedback.
Key Features:
1. Menu Management: The system
allows the restaurant to maintain a list of
dishes available for customers to order,
along with their prices and categories
(e.g., vegetarian, non-vegetarian, etc.).
2. Order Management: Customers can
view the menu and place orders, including
selecting the dish, specifying the quantity,
and choosing the delivery method (home
delivery or pick-up). The system
calculates the total price based on the
selected quantity.
3. Customer Details: When a customer
places an order, their details such as
name, mobile number, address, and order
details are captured and stored in the
database. This information is then used
for future references, such as order
tracking and bill generation.
4. Feedback Management: After placing
an order, customers have the option to
provide feedback, which is recorded in the
system for review. This helps the
restaurant gain insights into customer
satisfaction.
5. Order History and Bill Generation:
The system enables restaurant staff to
view all past orders and generate bills for
customers. The bill includes detailed
information about the ordered items, their
quantities, and the total amount due.
6. User Interface: The system provides
a text-based user interface, which guides
the user through various options, such as
viewing the menu, placing orders,
submitting feedback, and generating bills.
It ensures a seamless interaction with
customers and restaurant staff.
FUNCTIONS USED
cursor = connection.cursor()
# Customer details
cursor.execute("""
CREATE TABLE IF NOT EXISTS cusdet (
ORDER_ID INT AUTO_INCREMENT PRIMARY KEY,
QUANTITY INT NOT NULL,
NAME VARCHAR(100) NOT NULL,
MOBNO INT NOT NULL,
ADDRESS VARCHAR(255) NOT NULL,
ITEM_NAME VARCHAR(100) NOT NULL,
TOTAL_PRICE DECIMAL(10, 2) NOT NULL
)
""")
if menu:
print("\nAvailable Dishes:")
for dish in menu:
print(f"{dish[0]}. {dish[1]} - {dish[3]} - Rs{dish[2]}")
else:
print("No dishes available.")
choice = input("\nDo you want to order? (yes/no): ").strip().lower()
if choice == 'yes':
byo()
print("\nChoose Delivery Method:")
print("1. Home Delivery")
print("2. Pick-Up")
choice = input("Enter your choice: ").strip()
if choice == '1':
print("Home delivery selected. Your order will be delivered shortly.")
elif choice == '2':
print("Pick-Up selected. Your order will be ready for collection.")
else:
print("Invalid choice. Defaulting to Home Delivery.")
print("Home delivery selected. Your order will be delivered shortly.")
print("\nChoose Payment Method:")
print("1. Cash on Delivery")
print("2. Online Payment")
choice = input("Enter your choice: ").strip()
if choice == '1':
print("Cash on Delivery selected. Please prepare the exact amount.")
elif choice == '2':
print("Online Payment selected. You will receive payment details shortly.")
else:
print("Invalid choice. Defaulting to Cash on Delivery.")
print("Cash on Delivery selected. Please prepare the exact amount.")
else:
print("Goodbye!")
# Function to place an order
def byo():
try:
dish_id = int(input("Enter dish number to order: "))
quantity = int(input("Enter quantity: "))
query = "SELECT * FROM menu WHERE ID = " + str(dish_id)
cursor.execute(query)
dish = cursor.fetchone()
if dish:
dish_name = dish[1]
price = dish[2]
total_price = price * quantity
insert_query = f"""
INSERT INTO cusdet (QUANTITY, NAME, MOBNO, ADDRESS, ITEM_NAME,
TOTAL_PRICE)
VALUES ({quantity}, '{name}', {mobno}, '{address}', '{dish_name}', {total_price})
"""
cursor.execute(insert_query)
print(f"\nOrder placed! Total: Rs{total_price}")
connection.commit()
else:
print("Dish not found.")
except ValueError:
print("Invalid input. Please enter valid data.")
if message:
insert_query = f"""
INSERT INTO feedback (NAME, MESSAGE)
VALUES ('{name}', '{message}')
"""
cursor.execute(insert_query)
print("Thank you for your feedback!")
connection.commit()
else:
print("Feedback cannot be empty.")
if orders:
print("\nOrders:")
for order in orders:
print(f"Order ID: {order[0]}, Name: {order[2]}, Item: {order[5]}, Quantity: {order[1]}, Total:
${order[6]}, Address: {order[4]}")
else:
print("No orders found.")
# Function to generate bill
def generate_bill(order_id):
try:
query = f"SELECT * FROM cusdet WHERE ORDER_ID = {order_id}"
cursor.execute(query)
order = cursor.fetchone()
if order:
print("\n--- Bill ---")
print(f"Order ID: {order[0]}")
print(f"Customer Name: {order[2]}")
print(f"Mobile Number: {order[3]}")
print(f"Address: {order[4]}")
print(f"Item Name: {order[5]}")
print(f"Quantity: {order[1]}")
print(f"Total Price: Rs{order[6]}")
print("----------------")
else:
print("Order not found.")
except ValueError:
print("Invalid input. Please enter a valid Order ID.")
if choice == '1':
vmen()
elif choice == '4':
fdbck()
elif choice == '2':
view_orders()
elif choice == '3':
try:
order_id = int(input("Enter Order ID to generate bill: "))
generate_bill(order_id)
except ValueError:
print("Invalid input. Please enter a valid Order ID.")
elif choice == '5':
print("Exiting...")
break
else:
print("Invalid choice. Please try again.")
main()
cursor.close()
connection.close()
Tables in database ‘restaurant’ :
www.google.com
www.wikipedia.org
www.yahoo.com
Class XII Computer Science NCERT Textbook