0% found this document useful (0 votes)
8 views

CS Project Copy

The document outlines a project on Café Management developed by Alric Pareira for Class XII-A at St. Arnold's Central School. It details the project's objectives, development environment, and key functionalities of the Python-based application, which includes managing menu items, processing orders, and generating bills. The project serves as a practical application of database management and programming skills, aimed at enhancing restaurant operations and customer service.

Uploaded by

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

CS Project Copy

The document outlines a project on Café Management developed by Alric Pareira for Class XII-A at St. Arnold's Central School. It details the project's objectives, development environment, and key functionalities of the Python-based application, which includes managing menu items, processing orders, and generating bills. The project serves as a practical application of database management and programming skills, aimed at enhancing restaurant operations and customer service.

Uploaded by

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

ST. ARNOLD’S CENTRAL SCHOOL, PUNE.

Academic Year: 2024-25


Class- XII-A (CBSE)

COMPUTER SCIENCE
PROJECT
TOPIC:
Café Management

Submitted by: -
Name: Alric Pareira
Class: XII-A
Roll no: 6
TOPIC

Café
Management
CERTIFICATE
This is to certify that Alric Pareira of class XII A of St.
Arnold’s Central School has done his project on Cafe
Management under my supervision. He has taken
interest and has shown at most sincerity in completion
of this project.

I certify this Project up to my expectation & as per


guidelines issued by CBSE, NEW DELHI.

Internal Examiner External Examiner

Principal
ACKNOWLEDGEMENT
It is with pleasure that I acknowledge my sincere
gratitude to our teacher, Mrs.Elizabeth Emmanuel who
taught and undertook the responsibility of teaching the
subject computer science. I have been greatly benefited
from her classes.

I am especially indebted to our Principal Fr. Sunil


Menezes who has always been a source of
encouragement and support and without whose
inspiration this project would not have been a successful
I would like to place on record heartfelt thanks to him.

Finally, I would like to express my sincere appreciation


for all the other students for my batch their friendship &
the fine times that we all shared together.
PREFACE
In the field of Computer Science the term PROJECT
refers to a Computerization Work that is completely
performed by using a computer. Today when every field
is going to be computerized means that all task of any
field now a days done by using computer and their
appropriate computer programs, then to do every field’s
different-different works, today different programs or
software’s are available in the form of Project.

Learning Python in schools is a part of our syllabus, and


according to the syllabus worked out by the CBSE, to
which my school is affiliated, I enjoyed doing project
work for the session 2024-25. I learned a lot, especially
learning by doing was a great experience.

The report is a summary of what I observed and learnt


in school. My humble thanks are going to all the
concerned related to my project. I also feel that it is the
right time to thank my teacher, who guided me during
my project. I also feel that it is the right time to thank
my parents, friends and my project partners for their
constant assistance, co-operation extended by them
time to time.
Table of Content

Abstract..........................................................................................................................................7

Project Aim and Objective.....................................................................................8

Project Development Environment..............................................................8

Data flow Diagram.............................................................................................10-11

Algorithm.......................................................................................................................12-14

Code......................................................................................................................................15-19

SQL Table...............................................................................................................................19

Sample Output.........................................................................................................20-24

Bibliography………………………………………………………………………………….…….25
ABSTRACT
The Cafe Management System is a Python-based
application designed to streamline café operations by
integrating a user-friendly interface with a robust
database. This system enables cafe managers to
efficiently manage menu items, process customer orders,
and generate accurate bills. The project leverages SQL to
maintain a structured database that includes two primary
tables: the Menu Table for storing drink details and the
Orders Table for recording transaction data.

Key functionalities of the system include:

1. Adding new drinks to the menu with their respective


prices.
2. Removing drinks from the menu when no longer
offered.
3. Displaying the current menu in an organized format.
4. Taking customer orders by validating menu items
and calculating total costs.
5. Generating detailed bills with a breakdown of ordered
items and their quantities.

This project demonstrates the practical application of


database management concepts, Python programming,
and real-world problem-solving skills. It provides a
scalable and efficient solution for restaurant operations,
ensuring accuracy and enhanced customer service.
Additionally, it offers a foundation for integrating
advanced features such as inventory management or
online ordering in the future.
Project Aim and Objective
The project aims and objectives that will be achieved
after completion of the system is as follows:

 To design and develop a Cafe Management System


that efficiently manages Cafe operations by
integrating a Python-based application with a
database.
 To streamline key functionalities such as adding
and removing menu items, displaying the menu,
taking customer orders, and generating accurate
bills, ensuring seamless management and
enhanced customer satisfaction.
The objective of the Cafe Management System project
is to design and develop a comprehensive database-
driven application that efficiently manages the core
operations of a restaurant. This includes maintaining
and organizing the restaurant's menu, processing
customer orders, generating accurate bills, and storing
transaction records. The system aims to streamline
restaurant operations by providing an easy-to-use
interface for staff, reducing manual errors, and
ensuring accurate data management. Additionally, the
project seeks to enhance our understanding of
database design and the integration of databases with
Python, thereby equipping us with the skills necessary
for managing and developing database-driven
applications in real-world scenarios.
Project Development
Environment
Software:
 Operating System(Windows 9 or above): Windows
9 is selected as the base Operating Software
because of its additional file system, improved
performance on multi-core processors, improved
boot performances, security features and better
GUI.
 Programming Language (Python 3.6.x or higher)
 Pandas Library preinstalled
 Matplotlib Library preinstalled
 SQL preinstalled.
Hardware:
 Processor: Intel core i3 11th gen or higher or an
equivalent AMD processor.
 RAM: A minimum of 2 GB of ram is required.
 Hard Disc: A minimum of 2 GB of space is
required.
 Screen Resolution: Monitor with screen resolution
minimum 1024x768 pixels.

Data Flow Diagram(Flow


Chart)
Algorithm
choice( ) function

 Define the function.


 Create a pointer variable t.
 Display “Kindly enter your choice”.
 Set dimensions for t.
 Define five choice functions display_m( ),
add_m_item( ), take_orders( ), bill( ) and ter( )
 Each nested function creates a file pointer to its
specific text files containing related information.
 The function then transfers command to a
function as per the user’s request.

display_m( ) function

 Define the function.


 Open the file menu.txt in read( ) mode
 Display the contents of the file.
 Transfer command back to choice( ) function.
add_m_item( ) function

 Define the function.


 Ask the user for the password.
 Check if the password is correct.
 If incorrect password is entered more than five times,
call the ter( ) function.
 If the password is correct, open the file menu.txt in
read( ) and write( ) mode.
 Display the contents of the file.
 Accept the menu item to be added and price from
the user.
 Add the menu item and price to menu.txt.
 Transfer command back to choice( ) function.

order( ) function
 Define the function.
 Open file bill.txt in write mode.
 Accept the order from the user.
 Add the order along with the price to bill.txt.
 Ask whether the user wants to bill out or add more
orders.
 If the user chooses to add more orders, send the
command back to accepting the order.
 If the user chooses to bill out, call the bill( )
function.
bill( ) function

 Define the function.


 Open file bill.txt in read mode.
 Add up all the prices listed in the file.
 Add 18% of the sum as GST.
 Display the orders along with their prices.
 Display the GST and the total amount to be paid .
 Terminate the program.

ter( ) function
 Define the function.
 Terminate the program

Code
import sqlite3
from datetime import datetime

conn = sqlite3.connect('cafe.db')
cursor = conn.cursor()

cursor.execute('''
CREATE TABLE IF NOT EXISTS Menu (
item_id INTEGER PRIMARY KEY
AUTOINCREMENT,
item_name TEXT NOT NULL,
item_price REAL NOT NULL
)''')

cursor.execute('''
CREATE TABLE IF NOT EXISTS Orders (
order_id INTEGER PRIMARY KEY
AUTOINCREMENT,
item_name TEXT NOT NULL,
quantity INTEGER NOT NULL,
total_price REAL NOT NULL,
order_date TEXT NOT NULL
)''')

def add_menu_item():
item_name = input("Enter the name of the
drink: ")
item_price = float(input("Enter the price of
the drink: "))
cursor.execute("INSERT INTO Menu
(item_name, item_price) VALUES (?, ?)",
(item_name, item_price))
conn.commit()
print("Item added successfully!")
def remove_menu_item():
item_id = int(input("Enter the item ID to
remove: "))
cursor.execute("DELETE FROM Menu
WHERE item_id = ?", (item_id,))
conn.commit()
print("Item removed successfully!")

def display_menu():
cursor.execute("SELECT * FROM Menu")
menu = cursor.fetchall()
if menu:
print("\n--- Menu ---")
for item in menu:
print(f"{item[0]}. {item[1]} - ₹
{item[2]}")
else:
print("No items in the menu.")

def take_order():
order_list = []
while True:
display_menu()
item_id = int(input("Enter the item ID to
order (0 to stop): "))
if item_id == 0:
break
quantity = int(input("Enter the quantity:
"))
cursor.execute("SELECT item_name,
item_price FROM Menu WHERE item_id = ?",
(item_id,))
item = cursor.fetchone()
if item:
item_name, item_price = item
total_price = item_price * quantity
order_list.append((item_name,
quantity, total_price))
else:
print("Invalid item ID.")
if order_list:
print("\n--- Bill ---")
grand_total = 0
for order in order_list:
print(f"{order[0]} x {order[1]} =
₹{order[2]}")
grand_total += order[2]
cursor.execute("INSERT INTO Orders
(item_name, quantity, total_price,
order_date) VALUES (?, ?, ?, ?)",
(order[0], order[1], order[2],
datetime.now().strftime("%Y-%m-
%d %H:%M:%S")))
print(f"Grand Total: ₹
{grand_total}")
conn.commit()

def main():
while True:
print("\n--- Café Management System
---")
print("1. Add Menu Item")
print("2. Remove Menu Item")
print("3. Display Menu")
print("4. Take Order")
print("5. Exit")
choice = int(input("Enter your choice:
"))
if choice == 1:
add_menu_item()
elif choice == 2:
remove_menu_item()
elif choice == 3:
display_menu()
elif choice == 4:
take_order()
elif choice == 5:
print("Thank you for using the
Café Management System!")
break
else:
print("Invalid choice. Please try
again.")

if __name__ == "__main__":
main()

SQL Table
Sample Output
--- Cafe Management System ---
1. Add Menu Item
2. Remove Menu Item
3. Display Menu
4. Take Order
5. Exit
Enter your choice: 3

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0
10.Tiramisu Cappuccino - ₹375.0

--- Restaurant Management System ---


1. Add Menu Item
2. Remove Menu Item
3. Display Menu
4. Take Order
5. Exit
Enter your choice: 4

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0
10.Tiramisu Cappuccino - ₹375.0

Enter the item ID to order (0 to stop): 10


Enter the quantity: 2

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0
10.Tiramisu Cappuccino - ₹375.0
Enter the item ID to order (0 to stop): 6
Enter the quantity: 4

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0
10.Tiramisu Cappuccino - ₹375.0
Enter the item ID to order (0 to stop): 2
Enter the quantity: 1

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0
10.Tiramisu Cappuccino - ₹375.0
Enter the item ID to order (0 to stop): 0

--- Bill ---


Tiramisu Cappuccino x 2 = ₹750.0
Americano x 4 = ₹1300.0
Oreo Dalgona Frappe x 1 = ₹400.0
Grand Total: ₹2450.0

--- Restaurant Management System ---


1. Add Menu Item
2. Remove Menu Item
3. Display Menu
4. Take Order
5. Exit
Enter your choice: 2
Enter the item ID to remove: 10
Item removed successfully!

--- Restaurant Management System ---


1. Add Menu Item
2. Remove Menu Item
3. Display Menu
4. Take Order
5. Exit
Enter your choice: 3

--- Menu ---


1. Classic Cold Coffee- ₹350.0
2. OREO Dalgona Frappe - ₹400.0
3. Espresso - ₹250.0
4. Double Espresso- ₹350.0
5. Black Coffee - ₹300.0
6. Americano - ₹325.0
7. Mocha Cappuccino - ₹350.0
8. Mocha Latte - ₹375.0
9. Latte- ₹325.0

--- Restaurant Management System ---


1. Add Menu Item
2. Remove Menu Item
3. Display Menu
4. Take Order
5. Exit
Enter your choice: 5
Thank you for using the Restaurant
Management System!

Bibliography
 Computer science with python textbook for
classXII by sumit Arora.

 learnpython4cbse.com
 Thonny

 SQL

 Jupyter

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