0% found this document useful (0 votes)
21 views16 pages

Food Booking System

Uploaded by

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

Food Booking System

Uploaded by

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

Jawahar Navodaya

vidyalaya bhilwara

COMPUTER SCIENCE INVESTIGATORY


PROJECT (2024-25
(2024 )

Project title:-
title: food booking system

Prepared by:-
by: Rachna Regar and Anshika Salvi

Class:-12thscience

Guided
uided by:-Mr.
Mr. yogesh nama
CERTIFICATE
CLASS: XII-A YEAR: 2024-25

This is to certify that Investigatory Project of computer science


is successfully completed by RAChnA REgAR and

AnshIkA sAlvI student of Class XII(sCIEnCE), school

jAwAhAR nAvodAyA vIdyAlAyA huRdA


bhIlwARA for the academic year 2024-2025 on the topic

Food bookIng sysTEm.

Sign. of Internal Examiner Sign. of External Examiner

Sign. of Principal
Acknowledgement:

We RACHNA REGAR and ANSHIKA SALVI of

class 12THSCIENCE would like to express our

sincere gratitude to our computer science

teacher MR.YOGESH NAMA, PGT COMPUTER

SCIENCE for his vital support, guidance and

encouragement – without which this project

would not have come forth. We would also like to

express our gratitude to our school JAWAHAR

NAVODAYA VIDYALAYA BHILWARA for letting us

use the school laboratory.


Index

Brief overview of project

Need of computerization

Advantages

Limits

Source code screening

Python code

Output screen
FOOD BOOKING SYSTEM

BRIEF OVERVIEW OF PROJECT..

The main objective of the python project on Food


ordering is to manage the details of booking, menu
payments, and order.
The project is totally built at administrative end and
only administrator is guaranteed the access.
The purpose of the project is to build an application
program to reduce the manual work for managing
the booking, discounts, and payments.
It tracks all the details about menu, discount, and
payments; it also prints various reports as per input
given by the user.
NEED OF
COMPUTERISATION
Over the decades computers and food bookings have
developed gradually, changed with time. But nobody knew
that a time will come when both these fields will
complement each other so well. Today food booking has
reached new heights by computer aided methods of
design. As a result of which, computer industry has got its
new customer. Computer technology is making waves in
the food booking zone. Computers are a vital component
of the food booking counters. Computer aided design
(CAD) programs reduce the demand for manual sketches.
New software programs continue to replace old manual
skills. Those who lag in math can now breathe a little
easier. Manually figuring of food insists that knowledge.
Software programs constantly evolve. A program used
today may be obsolete within several years. Being trained
on today's software does not guarantee it will be used
when you are ready to go out into the field. Understanding
calculations is timeless, as is computer competency.
Software, however, shifts rapidly.
ADVANTAGES
1. It generates the report on sales, discounts and menu.
2. Provides filter report on payments and food booking.
3. We can easily export PDF on sales, products and stocks.
4. Applications can also provide excel export for bookings and
discounts.
5. It deals with monitoring the information and transaction of
food bookings.
6. It increases the efficiency of food booking and discount.
7. It has higher efficiency of editing, adding and updating of
records.
8. Provides the searching facilities on various factors.

LIMITS
1. Excel export has not been developed for bookings.
2. The transactions are executed in offline mode only.
3. Online transactions for sales, bookings, or other data
modifications are not possible.
4. Offline reports of sales, bookings, and discounts cannot be
generated due to batch mode execution.
SOURCE CODE SCREENING
DBMS: MySQL
Host: local host
User: root
Passwd: root
Database: Food
Table Structure: (Image
Image below)
PYTHON CODE:
import mysql.connector
import platform
import os

# Connect to MySQL database


def connect_to_db():
try:
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="root",
database="food"
)
return mydb
except mysql.connector.Error as err:
print(f"Error: {err}")
return None

# Function to safely execute queries


def execute_query(sql, data):
mydb = connect_to_db()
if mydb is None:
return
mycursor = mydb.cursor()
try:
mycursor.execute(sql, data)
mydb.commit()
print("Operation completed successfully.")
except mysql.connector.Error as err:
print(f"Error executing query: {err}")
finally:
mydb.close()
# Function to add Customer data
def Customer():
c_id = int(input("Enter the customer ID number: "))
name = input("Enter the Customer Name: ")
cphone = input("Enter customer phone number: ")
payment = int(input("Enter payment method (1)credit
card/(2)Debit Card: "))
pstatus = input("Enter the payment status: ")
email = input("Enter the email id: ")
orderid = input("Enter order id: ")
date = input("Enter the Date (YYYY-MM-DD): ")

cust = (c_id, name, cphone, payment, pstatus, email, orderid,


date)
sql = "INSERT INTO Customer (c_id, name, cphone, payment,
pstatus, email, orderid, date) VALUES (%s, %s, %s, %s, %s, %s,
%s, %s)"
execute_query(sql, cust)

# Function to add Employee data


def Employee():
Emp_id = int(input("Enter the Employee ID: "))
ename = input("Enter the Employee Name: ")
emp_g = input("Enter Employee Gender: ")
eage = int(input("Enter Employee age: "))
emp_phone = input("Enter employee phone number: ")
pwd = input("Enter the password: ")

EMP = (Emp_id, ename, emp_g, eage, emp_phone, pwd)


sql = "INSERT INTO Employee (Emp_id, ename, emp_g, eage,
emp_phone, pwd) VALUES (%s, %s, %s, %s, %s, %s)"
execute_query(sql, EMP)

# Function to add Food data


def Food():
Food_id = int(input("Enter the Food ID: "))
Foodname = input("Enter the Food Name: ")
Food_size = input("Enter Food size: ")
prize = int(input("Enter the price of Food: "))

Food = (Food_id, Foodname, Food_size, prize)


sql = "INSERT INTO Food (Food_id, Foodname, Food_size,
prize) VALUES (%s, %s, %s, %s)"
execute_query(sql, Food)

# Function to add OrderFood data


def OrderFood():
OrderF_id = int(input("Enter the Food Order ID: "))
C_id = int(input("Enter the Customer ID: "))
Emp_id = int(input("Enter Employee ID: "))
Food_id = int(input("Enter Food ID: "))
Food_qty = int(input("Enter Quantity: "))
Total_price = float(input("Enter Total Price: "))

OrderFood = (OrderF_id, C_id, Emp_id, Food_id, Food_qty,


Total_price)
sql = "INSERT INTO OrderFood (OrderF_id, C_id, Emp_id,
Food_id, Food_qty, Total_price) VALUES (%s, %s, %s, %s, %s,
%s)"
execute_query(sql, OrderFood)

# Function to add fee deposit data


def feeDeposit():
roll = int(input("Enter the roll number: "))
feedeposit = int(input("Enter the Fee to be deposited: "))
month = input("Enter the month of fee: ")

fee = (roll, feedeposit, month)


sql = "INSERT INTO fee (roll, feedeposit, month) VALUES
(%s, %s, %s)"
execute_query(sql, fee)
# Function to view details based on criteria
def View():
mydb = connect_to_db()
if not mydb:
return
mycursor = mydb.cursor()

print("Select the search criteria: ")


print("1. Employee")
print("2. Customer")
print("3. Food")
print("4. Order Food")

ch = int(input("Enter the choice (1 to 4): "))

if ch == 1:
s = int(input("Enter Employee ID: "))
rl = (s,)
sql = "SELECT * FROM Employee WHERE Emp_id=%s"
mycursor.execute(sql, rl)
res = mycursor.fetchall()
for x in res:
print(x)

elif ch == 2:
s = input("Enter Customer Name: ")
rl = (s,)
sql = "SELECT * FROM Customer WHERE name=%s"
mycursor.execute(sql, rl)
res = mycursor.fetchall()
for x in res:
print(x)

elif ch == 3:
sql = "SELECT * FROM Food"
mycursor.execute(sql)
res = mycursor.fetchall()
for x in res:
print(x)

elif ch == 4:
s = int(input("Enter Food Order ID: "))
rl = (s,)
sql = "SELECT * FROM OrderFood WHERE
OrderF_id=%s"
mycursor.execute(sql, rl)
res = mycursor.fetchall()
for x in res:
print(x)

mydb.close()

# Menu for various operations


def MenuSet():
print("Enter 1: To Add Employee")
print("Enter 2: To Add Customer details")
print("Enter 3: To Add Food Details")
print("Enter 4: For Food Order")
print("Enter 5: For Fee Deposit")
print("Enter 6: To View Data")

try:
userInput = int(input("Please Select An Option (1 to 6): "))
except ValueError:
print("That's Not A Number!")
return
else:
print("\n")
if userInput == 1:
Employee()
elif userInput == 2:
Customer()
elif userInput == 3:
Food()
elif userInput == 4:
OrderFood()
elif userInput == 5:
feeDeposit()
elif userInput == 6:
View()
else:
print("Enter correct choice...")

# Function to run the menu again


def runAgain():
runAgn = input("\nWant to run again (Y/N): ")
while runAgn.lower() == 'y':
if platform.system() == "Windows":
os.system('cls')
else:
os.system('clear')
MenuSet()
runAgn = input("\nWant to run again (Y/N): ")
print("Good Bye ... HAVE A NICE DAY")

# Running the menu


MenuSet()
runAgain()
oUtPUt ScReen

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