Computer Science1 .PDF
Computer Science1 .PDF
PROJECT ON
BAKERY
MANAGEMENT SYSTEM
SUBMITTED BY
NAME: Abinav K J
2024-25
1
CERTIFICATE
2024-2025.
Principal
2
ACKNOWLEDGEMENT
I undertook this Project work, as a part of my XII-Computer science
course. I had tried to apply my best of knowledge and experience,
gained during the study and class work experience. However,
developing software systems is generally a quite complex and time-
consuming process. It requires a systematic study, insight vision and
professional approach during the design and development. Moreover,
the developer always feels the need, the help and good wishes of the
people near you, who have considerable experience and idea.
3
TABLEOF
CONTENTS
1. INTRODUCTION ………………………….1
2.OBJECTIVE AND SCOPE………………..2
3.SOFTWAREDEVELOPMENT
TOOLS USED..…………………………………3
4.DATABASEDESIGN………………………..5
5.FRONT-ENDDESIGN.…………………….7 6.
SOURCE CODE.………….…………………..9 7.
OUTPUT SCREENS………………………..19 8.
SYSTEM REQUIREMENTS…………….30 9.
REFERENCES…………………………..…….31
4
1.INTRODUCTION
5
2. OBJECTIVE AND SCOPE
The objectives of the project are:
6
3. SOFTWARE DEVELOPMENT TOOLS USED
Anaconda:
Anaconda is a free and open source integrated development
environment (IDE) for development of Python programming
language. It simplifies the package management and
deployment for Python programming language. It comes with
more than 1500 packages as well as the conda package and
virtual environment manager. It also includes a GUI, the
Anaconda Navigator, which is a graphical alternative to the
command line interface of Python.
8
4. DATABASE DESIGN
These tables were created and certain values were added in MySQL:
1. Items Table :
This table holds the details of all the items available at the bakery. Whenever a new item
is added to the menu, its details can be added to this table.
2. Flavours Table:
This table contains all the flavours of cakes and cupcakes available at the bakery.
Whenever a new flavour is added to the menu, its details are added in this table.
3. Cookie_Flavours Table:
This table contains all the flavours of cakes and cupcakes available at the bakery.
Whenever a new item is added to the menu, the details are added in this table.
9
4. Orders Table:
This table contains all the details of the orders taken at the bakery
5. Workers Table:
This table contains all the details of the employees at the bakery..
10
CREATE TABLES
CREATE TABLE Items
(s_no INTEGER PRIMARY KEY,
products VARCHAR(20) UNIQUE,
cost INTEGER NOT NULL);
11
INSERT DATA
5 cookies 50
Jasmine
COOKIE_FLAVOURS
INSERT VALUES INTO
COOKIE_FLAVOURS s_no flav
insert into items values(1, 'chocolate');
1 2 3 Vanila
insert into items values (2, 'choco-chip')
45 Chocolate
insert into items values(3, 'butter")
Strawberry
insert into items values (4, 'sugar’)
insert into items values (5, 'raisin’) Butter_scotch
Jasmine
12
INSERT VALUES INTO WORKERS
WORKERS
s_no emp_name salary dept
insert into items values
(1,'Manish',8000,’cashier ’);
1 Manish 8000 cashier
insert into items values
(2, 'Leo',7000,’cashier’)
2 Leo 7000 cashier
insert into items values
(3, 'Jen',15000,’chef’) 3 Jen 15000 chef
insert into items values
(4, 'Ray’,20000,’chef’) 4 Ray 20000 chef
insert into items values
(5, 'Jennifer’,23000,’chef’) 5 Jennifer 23000 chef
13
5. FRONT END DESIGN
________________________________
| |
|........... WELCOME ...........|
|.............. TO .............|
|... BAKERY MANAGEMENT SYSTEM...|
| |
|...............................|
|_______________________________|
1. View Menu
2. Order items
3. View Flavours
4. Add New item to Menu
5. Update Cost of items
6. Add new flavour
7. View Employees
8. Add Employee
9. To View Orders And Sales
10.Exit
1. View Menu- This menu option is used to view all the items at the Bakery.
2. Order items - This menu option is used to order the items from the
bakery and add the record to the orders table.
3. View flavours - This menu option is to view the variety of flavours sold.
4. AddNewItem-Thismenuoptionisusedtoaddthedetailsofanewitem
to the menu.
5. UpdateCost-Thismenuoptionallowsyoutochangethecostofanyitem
in the menu.
6. AddNewFlavour-Thismenuoptionisusedtoaddthedetailsofa
flavour to the menu.
7. Viewemployees-Thismenuoptionistoviewthedetailsofall
employees at the bakery
8. Add employee - This menu option is used to add the details of a new
employee
9. ToViewOrdersAndSales-Thismenuoptionisusedtoviewthedetailsof
orders and sales over a week
10. Exit-Thisoptionisusedtoexittheapplication
14
6. SOURCE CODE
import mysql.connector
con=mysql.connector.connect(host= 'localhost',
user='root',password='sweet',database=’bakery’)
cur=con.cursor()
15
########################## TO VIEW COOKIES FLAVOURS ######################
def cookie_variety():
print("Varieties available for Cookies:")
s="select from cookie_flavours"
cur.execute(s)
L=[]
rs=cur.fetchall()
t=(['serial_no', 'varieties'])
for serial_no, varieties in rs:
print(serial_no, ":", "\t", varieties)
L.append(varieties)
return L
16
############################# USER INTERFACE ###############
def for_order():
print ("what do you want to order?\n")
items()
d=int(input("Enter your serial No of the item to buy:"))
def bill():
Bill_start()
da=cur.execute("Select cost from items")
da=cur.fetchall()
da=da[0][2]
c=int(da)
print("Total Quantity of ",f, “:”, qty)
print("total amount", qty*c)
cur.execute("insert into orders
values(’{}’,’{}’,{},’{}’);”.format(Name,”Cake”,qty*c,Date)
print("\n")
Bill_end()
return c
if ck==1:
print("How much Quantity of Vanilla cake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
print("\n")
f=’Vanilla cake’
bill()
print()
elif ck==2:
print("How much Quantity of Chocolate cake do you want?")
qty=int(input("Enter Qty: "))
print("You have successfully ordered your item!!!:")
f=’Chocolate cake’
bill()
print()
elif ck==3:
print("How much Quantity of Strawberry cake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Strawberry cake’
bill()
print()
elif ck==4:
print("How much Quantity of Butterscotch cake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Butterscotch cake’
bill()
print()
17
elif ck==5:
print("How much Quantity of Jasmine cake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Jasmine Cake’
bill()
print()
#################################################################
elif d==2:
def bill_2():
Bill_start()
print("Total quantity of pastry:", past)
print("Total amount=", past*c)
Bill_end()
cur.execute(“Insert into orders
values(’{}’,’{}’,{},’{}’);”.format(Name,”pastry”,past*c,Date)
print("\n")
bill_2()
#################################################################
bill_3 ()
18
##################### TO ORDER CUPCAKES ###########################
elif d=4:
def bill_4():
Bill_start()
da=cur.execute("Select * from items")
da=cur.fetchall()
da=da[3][2]
c=int(da)
print("Total Quantity of ",f, “:”, qty)
print("total amount", qty*c)
Bill_end()
cur.execute(“Insert into orders
values(’{}’,’{}’,{},’{}’);”.format(Name,”cupcake”,qty*c,Date)
print("\n")
if ck==1:
print("How much Quantity of Vanilla Cupcakes do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
print("\n")
f=’Vanilla Cupcake’
bill_4()
print()
elif ck==2:
print("How much Quantity of Chocolate Cupcake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Chocolate Cupcake’
bill_4()
print()
elif ck==3:
print("How much Quantity of Strawberry Cupcake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Strawberry Cupcake’
bill_4()
print()
elif ck==4:
print("How much Quantity of Butterscotch Cupcake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Butterscotch Cupcake’
bill_4()
print()
elif ck==5:
print("How much Quantity of Jasmine Cupcake do you want?")
qty=int(input("Enter Qty:"))
print("You have successfully ordered your item!!!:")
f=’Jasmine Cupcake’
bill_4()
print()
##################################################################
19
########################## TO ORDER COOKIES ######################
elif d=5:
def bill_5()
Bill_start()
print("Total quantity of Cookies:", cook)
print("Total amount=", cook*c)
Bill_end()
cur.execute(“Insert into orders
values(’{}’,’{}’,{},’{}’);”.format(Name,”cookies”,cook*c,Date)
print("\n")
cur.execute("Select * from items")
d=cur.fetchall()
d=d[4][2]
c=Int(d)
print("Choose which Cookie do you want?")
print("###NOTE: All Varieties Of Cookies Have Same Cost As That Of Cookies ###""")
L=cookie_variety()
ck=int(input("Enter your Choice:"))
f=L[ck-1]
print("How many cookies do you want?")
cook=Int(input("Enter quantity:")
print("You have successfully ordered", cook , "Cookies")
print("\n")
bill_5()
#################################################################
def Bill_start():
print("..................................................................”)
print("YOUR BILL")
print("..................................................................”)
print("Costumer's name:", Name)
print("contact no:", Phone)
Bill_end()
print(‘@@@@@@@@@@ THANK YOU FOR ORDERING THESE ITEMS @@@@@@@@@@’)
print(‘@@@@@@@@@@@@@@@ VISIT US AGAIN @@@@@@@@@@@@@@@@@@’)
#####################################################################
20
ENTRANCE
########################## CODE
##############################
print(“ _______________________________ “)
print(“ | | “)
print(“ |...........WELCOME...........| “)
print(“ |..............TO.............| “)
print(“ |...BAKERYMANAGEMENTSYSTEM...| “)
print(“ | | “)
print(“ |...............................| “)
print(“ |_______________________________| “)
Name=input(“Enter your name: “)
Phone=int(input(“Enter your phone number: “))
Date=input(‘Enter date like (YYYY-MM-DD): ‘)
print(‘\n’)
#MAIN CODE
def Main():
ch=’ ‘
while ch!=’N’ or ch!=’n’ :
def func():
print(‘‘‘PLEASE CHOSE
1. TO VIEW MENU
2. TO ORDER
3. TO VIEW CAKE AND CUPCAKE FLAVOURS
4. TO ADD NEW ITEM TO MENU
5. TO UPDATE COST OF ITEMS
6. TO ADD NEW FLAVOUR
7. TO VIEW EMPLOYEES
8. TO ADD A NEW EMPLOYEES
9. TO VIEW ORDERS AND SALES OVER A WEEK
10.TO EXIT \n’’’)
choice= int(input(“Enter your choice: “))
If choice==10 :
return
elif choice==1 :
print(‘Items in the shop: ’)
items()
func()
elif choice==2:
for_order()
func()
elif choice==3:
print(‘press 1 to see cake flavours ’)
print(‘press 2 to see cupcake flavours: ’ )
e=int(input(‘CHOOSe: ‘))
if e==1:
variety()
func()
elif e==2:
cup_variety()
func()
elif choice==4:
add_item()
func()
elif choice==5:
updating_item()
func()
elif choice==6:
add_ck_flavour
func()
21
elif choice==7:
workers()
func()
elif choice==8:
add_worker()
func()
elif choice==9:
check_sales()
func()
else:
print(‘Wrong input”)
func()
fun()
ch=input(“ARE YOU SURE TO EXIT FROM PROGRAM (Y/N)? “)
If ch==’y’ or ch==’Y’ :
exit()
Main()
22
OUTPUT SCREENS
1. To View Menu
_______________________________
| |
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23
2. To Place An Order
_______________________________
| |
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
24
3. To View Cake and Cupcake Flavours
_______________________________
| |
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
25
4. To Add New Item To Menu
_______________________________
| |
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
26
5. To Update Cost Of an Item
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
27
6. Adding New Flavour To Menu
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
28
7. Viewing Employees
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
29
8. Adding New Employee
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
30
9. To view orders and sales over a week
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31
10. Exiting
_______________________________
||
| . . . . . . . . . . . W E L C O M E . . . . . . . . . . . |
| . . . . . . . . . . . . . . T O . . . . . . . . . . . . . |
| . . . B A K E R Y M A N A G E M E N T S Y S T E
| |
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
32
SYSTEM REQUIREMENTS
HARDWARE:
➢ Intel Pentium G620 2.6 GHz
➢ 4 GB RAM
➢ Free Space 1 MB
SOFTWARE:
➢ Minimum Windows 7 32 bit
➢ Spyder Version 3.2.8 with mysql.connector with
random library
➢ MySQLVersion5.2.43
33
REFERENCES
34