CS Project
CS Project
The right type of guidance in a sincere and selfless manner is the highest
service a man renders to fellow beings.
Here I wish to express my sincere thanks to everyone who helped me to complete
this work in the most appropriate ways.
First and foremost, I wish to express my eternal gratitude and a sincere prayer to
God. The almighty whose divine grace has given me confidence, strength and
courage to successfully complete this work.
I would like to express my gratitude to my principal Rev. Fr. Mathew Kareethara
CMI and the school management for their whole hearted support and providing me
the necessary infrastructure for completion of this project. I would like to convey
my sincere thanks to Mrs. Anitha Jose for her continuous support and
encouragement in the completion of project.
Above all, I am greatly indebted to each and every one who has helped me in the
completion of this project.
BAKERY MANAGEMENT
SYSTEM
ABSTRACT
The bakery industry plays a vital role in the culinary landscape, offering a
wide array of products ranging from bread and pastries to cakes and specialty items.
As consumer preferences shift and competition increases, bakeries must adopt
efficient management practices to stay relevant and profitable. However, many small
to medium-sized bakeries still rely on traditional methods for inventory tracking,
order processing, and sales management, which can lead to inefficiencies, increased
waste, and customer dissatisfaction.
4. User-Friendly Interface: An intuitive design that allows staff of all technical skill
levels to navigate the system easily, fostering quick adoption and effective training.
1
This document is organized into several chapters, each dedicated to a specific
aspect of the Bakery Management System. Chapter One delves into the system
architecture, detailing the technologies and frameworks employed. Chapter Two
focuses on user interface design, emphasizing usability and accessibility. Chapter
Three discusses the database management system, outlining how data is structured
and stored securely. Chapter Four presents the implementation of key functionalities,
while Chapter Five reviews testing protocols and performance optimization. Finally,
Chapter Six concludes with a discussion of future enhancements and the potential
for scalability.
2
METHODOLOGY
1. Python
Python is a versatile, high-level programming language renowned for its
readability and ease of use. These characteristics make it particularly well-suited for
the Bakery Management System. Key features include:
Pandas: This library is instrumental for data manipulation and analysis, making it
easier to manage inventory data and generate sales reports.
NumPy: Useful for numerical operations, it can help in analyzing sales trends and
forecasting.
Requests: This library simplifies making HTTP requests, enabling easy integration
with external services such as payment gateways.
1.3. Cross-Platform Compatibility
3
One of Python's key strengths is its cross-platform nature, allowing
applications to run on various operating systems like Windows, macOS, and Linux.
This flexibility means that bakery owners can deploy the Bakery Management
System in a way that suits their existing infrastructure, enhancing accessibility for
users.
1.4. Strong Community Support
Python has a large and active community, providing extensive documentation,
forums, and resources. This community-driven support helps developers
troubleshoot issues, share best practices, and find code snippets, making
development faster and more efficient.
2. MySQL
MySQL is a widely-used open-source relational database management system
(RDBMS) that provides a reliable backend for the Bakery Management System. Its
key features include:
Products: Storing details about baked goods, including ingredients, prices, and
quantities.
Orders: Keeping track of customer orders, linking them to specific products and
customer information.
Customers: Managing customer profiles, including contact information and
purchase history.
This structured approach ensures data integrity and simplifies data retrieval
for reporting purposes.
2.4. Scalability
As bakeries grow, their data management needs become more complex.
MySQL is designed to scale effortlessly, handling larger data volumes and
accommodating more concurrent users. This scalability ensures that the Bakery
Management System can grow alongside the business, meeting evolving operational
demands.
5
IMPLEMENTATION REQUIREMENTS
2. Programming Language:
Hardware Requirements:
1. Processor:
o Minimum: Dual-core processor (Intel Core i3 or equivalent).
o Recommended: Quad-core processor (Intel Core i5 or equivalent).
6
2. RAM:
o Minimum: 4 GB (for development and testing).
o Recommended: 8 GB or more (to smoothly run multiple services like
MySQL Server, IDE, and a web server).
3. Storage:
o Minimum: 500 GB HDD or 128 GB SSD (preferably SSD for faster
performance).
o Recommended: 256 GB SSD or more (if working with large data sets
or long-term projects).
4. Display:
o A standard display with at least a resolution of 1366x768 pixels.
o Recommended: Full HD (1920x1080) or higher for better productivity
when using IDEs and database management tools.
5. Internet Connection:
o Required for downloading dependencies, using external libraries, and
possibly connecting the system with an online database (if remote
hosting is involved).
7
CODING
import mysql.connector
import time
connection = mysql.connector.connect(
host='your_host',
user='your_username',
password='your_password'
database='your_database'
)
cursor = connection.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS Menu(
product_id INT AUTO_INCREMENT PRIMARY KEY,
product_name VARCHAR(255),
product_price INT
)
''')
cursor.execute('SELECT * FROM Menu')
results = cursor.fetchall()
if not results:
cursor.execute('''
INSERT INTO Menu (product_name, product_price)
VALUES
('Cake', 400),
('Bread', 50),
('Cookies', 100),
('Doughnuts', 80),
('Pie', 120)
''')
connection.commit()
def main():
8
while True:
print("\n
")
print("---------------------Welcome to Moon Pie
Bakery!---
")
print("
")
if choice == '1':
password = input("Enter the password: ")
if password == "MoonPie":
admin_login(connection, cursor)
else:
print("Incorrect Password!")
time.sleep(1)
if choice == 1:
product_name = input("Enter product name: ")
product_price = input("Enter product price: ")
try:
cursor.execute('INSERT INTO Menu
(product_name,
product_price) VALUES (%s, %s)',
(product_name, product_price))
connection.commit()
print("The item has been added to the list!")
except Exception as e:
print("Error occurred:", e)
elif choice == 2:
display_items(cursor)
id = int(input("Enter product ID to remove: "))
cursor.execute('DELETE FROM Menu WHERE
product_id = %s', (id,))
connection.commit()
print("The item has been removed from the shop!")
elif choice == 3:
10
display_items(cursor)
id = int(input("Enter product ID to update: "))
new_price = int(input("Enter the updated price:
"))
cursor.execute('UPDATE Menu SET product_price =
%s WHERE product_id = %s', (new_price, id))
connection.commit()
print("The item price has been updated!")
elif choice == 4:
display_items(cursor)
elif choice == 5:
break
else:
print("Invalid Choice!")
def display_items(cursor):
cursor.execute('SELECT * FROM Menu')
results = cursor.fetchall()
print("List of items:")
print("ID", "Name", "Price", sep=" ")
for each in results:
print(each[0], each[1], each[2], sep=" ")
def customer_login(connection, cursor):
print("-----------Welcome, You are logged in as a
biller!-----
")
while True:
print("1: Billing", "2: Exit", sep="\n")
choice = int(input("Enter your choice: "))
11
if choice == 1:
name = input("Enter the customer name: ")
print(f"What do you wanna buy, {name}?")
display_items(cursor)
total = 0
items = []
while True:
id = int(input("Enter the product ID: "))
quantity = int(input("Enter the quantity: "))
cursor.execute('SELECT * FROM Menu WHERE
product_id = %s', (id,))
result = cursor.fetchone()
if result:
total += result[2] * quantity
items.append([result[1], quantity])
more = input("Anything else? (Y/N): ")
if more.upper() == 'N':
break
else:
print("Invalid product ID!")
if total != 0:
print("\n---------Moon Pie Bakery ------------- ")
print("-------Billing Details ----------- ")
print(f"Name: {name}")
print("Items:")
for each in items:
print(each[0], each[1], sep=":")
print(f"Total: {total}")
print("Thank you! Have a sweet day!")
12
time.sleep(1)
elif choice == 2:
break
else:
print("Invalid Choice!")
if name == " main ":
main()
13
SCREENSHOTS
Adding an item
14
Update price of item
Remove an item
15
To display all items
Exit
16
Billing
17
Exit from the software
Billing
18
Enter list of items
19
Table:Menu
product_id product_name product_price
1 Cake 400
2 Bread 50
3 Cookies 100
4 Doughnuts 80
5 Pie 120
20
CONCLUSION
21
REFERENCES
MySQL
https://www.mysql.com/downloads/
Python
https://www.python.org/downloads/
www.wikipedia.com
www.google.com
www.codecademy.com
Class XII Computer Science Textbook
22