You are on page 1of 17

SPARTAN INTERNATIONAL SENIOR SECONDARY

SCHOOL No.570, KANNADASAN STREET,


CHEMBARAMBAKKAM, CHENNAI – 600123.

Computer Science Project


2023-2024

Café Management
System

Submitted by,
Suchit Prabu V
12-A
ACKNOWLEDGEMENT

In the accomplishment of this project successfully, many


people have owed upon me their blessings and the heart
pledged support, this time I am utilizing to thank all the
people who have been concerned with the project.

Primarily, I would thank God for being able to complete


this project with success. Then, I would like to thank my
Computer Science Teacher Mr. Ramamoorthy, whose
valuable guidance has been the ones that helped me in
this project and made it a full proof success.

Also, I would like to thank my parents and friends who


have helped me with their valuable suggestions and
guidance, which have been helpful in various phases of
the completion of this project.

Last but not the least, I am grateful to the internet that


has helped me with the most bountiful information.
CONTENTS

 Hardware and software specifications


 Source Code
 Database
 Output
 Bibliography
Hardware and Software specifications

Device Specifications:

Core- Intel(R) Core (TM) i3-9100 CPU @ 3.60GHz


RAM- 4.00 GB
System type- 64-bit operating system, x64-based processor

Software:
mydb=mysql.connector.connect(host="localhost", user="root",
password="root", database="Cafe_Management_System")
mycursor=mydb.cursor()

#..............FOR VIEWING MENU SECTION..............


def vmenu():
q="select*from menu".format()
mycursor.execute(q)
menu=mycursor.fetchall()
if len(menu)>0:
print("\n\n\n----------Available Menu----------\n\n\
n")
for i in menu:
print("Item Number",i[0], "\n","----
>",i[1],"(TYPE:",i[3],")","\n", 'PRICE',i[2])
print("\n\n")
mydb.commit()
yn=int(input("DO YOU WANT TO ORDER AN ITEM? type '1' for
yes/type '2' for going back to the main page"))
if yn==1:
order()
else :
print("THANK YOU")
print("YOU HAVE BEEN REDIRECTED TO THE MAIN PAGE")
return

#..............FOR BOOKING ORDER..............


def order():
ID=int(input("ENTER DISH NO. OF THE ITEM YOU WANT TO
ORDER: "))
QUANTITY=int(input("ENTER THE QUANTITY: "))
NAME=input("ENTER YOUR NAME: ")
MOB_NO=int(input("ENTER YOUR MOBILE NUMBER: "))
a="select * from menu where ID={}".format(ID)
mycursor.execute(a)
a=mycursor.fetchall()
b=a[0][2]
c=QUANTITY*b
ins="insert into cusdet values({},{},'{}',{},
{})".format(ID,QUANTITY,NAME,MOB_NO,c)
mycursor.execute(ins)
print("\n", "YOUR ORDER HAS BEEN PLACED SUCCESSFULLY", "\
n\n", "THANK YOU FOR YOUR ORDER","\n\n")
print("YOU HAVE BEEN REDIRECTED TO THE MAIN PAGE")
mydb.commit()

#..............FOR VIEWING ORDER..............


def vyo():
c=int(input("ENTER YOUR MOBILE NUMBER:"))
d="select * from cusdet where MOB_NO={}".format(c)
print("\n","YOUR RECENT ORDERS","\n")
mycursor.execute(d)
p=mycursor.fetchall()
for i in p:
r="select * from menu,cusdet where MOB_NO={} and
menu.ID=cusdet.ID".format(c)
mycursor.execute(r)
e=mycursor.fetchall()
for j in e:
print("ID:",j[0], "\n","ITEM NAME:", j[1], "\n",
"ITEM TYPE:",j[3], "\n", "TOTALPRICE",j[8]," \
n","MOB_NO:",j[7], "\n")
mydb.commit()

#..............FOR CANCELLING ORDER..............


def cancel():
c=int(input("ENTER YOUR MOBILE NUMBER:"))
e="delete from cusdet where MOB_NO={}".format(c)
mycursor.execute(e)
print("\n\n","YOUR ORDER HAS BEEN CANCELLED")
print("YOU HAVE BEEN REDIRECTED TO THE MAIN PAGE","\n\n")
mydb.commit()

#..............WELCOME PAGE 1..............


def start():
print("\n")
print("\n")

print(".......................................................
......")
print("----------------------WELCOME
TO----------------------")

print(":::::::::::::::::::::::::::::::::::::::::::::::::::::")
print("[::::::::::::::::::>WILDBEANS
CAFE<:::::::::::::::]")

print(":::::::::::::::::::::::::::::::::::::::::::::::::::::")

print(" ......................................................
......")
print("\n")
print("PRESS THE ASSIGNED KEY TO MOVE FORWARD")
print("CUSTOMER - 1")
print("EXIT - 2")

#..............WELCOME PAGE 1..............


def start1():
print("TO VIEW MENU, PRESS 1")
print("TO PLACE AN ORDER, PRESS 2")
print("TO VIEW YOUR ORDERS, PRESS 3")
print("TO CANCEL THE ORDER, PRESS 4")
print("TO EXIT, PRESS 5")
ch1=int(input("ENTER YOUR CHOICE: "))
if ch1==1:
vmenu()
elif ch1==2:
order()
elif ch1==3:
vyo()
elif ch1==4:
cancel()
elif ch1==5:
print("THANK YOU")
q=1
while q>0:
break
else:
print("\n","INVALID CHOICE"," \n", "TRY AGAIN"," \n")
start1()
start()

#Welcome Page Infinite loop


while True:
ch=int(input("ENTER YOUR CHOICE:"))
if ch==1:
start1()
elif ch==2:
print("THANK YOU")
break
else:
print("INVALID CHOICE", "\n", "TRY AGAIN")
start

You might also like