Cherry Cafe[1]

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

COMPUTER SCIENCE

PROJECT FILE
SESSION: 2024-25
SUBJECT CODE: 083

DONE BY

NAME:
CLASS & SEC:
ROLL NO:
CHERRY CAFÉ MANAGEMENT
SYSTEM
ACKNOWLEDGEMENT
I wish to express my sincere thanks to our founder
and Chairman, SHRI.N.DEVARAJAN, for his endeavour
in educating us in his premiere instituition.
I would like to express my gratitude to our
Correspondent SHRI. BALAJI DAGUPATHI for his kind
words and enthusiastic motivation which inspired us a
lot in completing this project.
I wish to express my sincere thanks to our director
SHRI.SUMAN BABU YARLAGGADA, for providing us
with necessary facilities for completion of this project.
I would like to express my thanks and gratitude to our
principal Mrs. RENUKA BALAJI NALLAMAR for her
encouragement and her sincere guidance.
I am obliged to thank our senior Vice Principal
Mrs. Suchitra Santhosh for providing us with ample
time and encouragement for successful completion of
this Project.
I cover my thanks to Mrs. JULIYA and all the staffs in
the computer science department for their valuable
support.

INDEX
S.NO TOPIC
1 System Requirements
2 Feasibility study
3 Errors and its types
4 Testing
5 Maintenance
6 Project Synopsis
7 Flow chart of program
8 Coding and Output
9 Appendix
10 Bibliography
SYSTEM REQUIREMENTS

1. HARDWARE:
✓ Processor
✓ Keyboard
✓ Minimum memory - 2GB

2. SOFTWARE:
✓ Operating System –OS7, OS8
✓ Python IDLE
✓ MYSQL
FEASIBILITY STUDY:
Feasibility study is a system proposal according to its
work, ability, impact on the operation ability to meet
the needs of users and efficient use of resources. An
important outcome of preliminary investigations the
determination of that system requested feasible.

ECONOMICAL FEASIBILITY:
Economics analysis is the most frequent use method
for evaluating the effectiveness of the candidates the
benefits and savings that are expected from system
and compare them with cost.
This software is not very costly. It just worth Rs.5500/-.
So users records can be maintained at a cheaper cost
and every school would like to use this software so that
the student’s records can be managed easily.
TECHNICAL FEASIBILTY:
Technical feasibility centre on the existing computer
system and to what extent it can support the proposed
task. This involves financial consideration to
accommodate technical enhancements. It is technically
feasible because whatever technology is needed to
develop this software is easily available.
ERRORS AND ITS TYPES
An error, sometime called “A BUG” is anything in the
code that prevents a program from compiling and
running correctly. There are broadly three types of
errors as follows:
1. Compile- time errors: Errors that occurs during
compilation of a program is called compile time error.
It has two types as follows:
a. Syntax error: It refers to formal rules governingthe
construction of valid statements in a language.
b. Semantics error: It refers to the set of rules which
give the meaning of a statement.
2. Run time Errors
Errors that occur during the execution of program are
run time errors. These are harder to detect errors.
Some run-time error stop the execution of program
which is then called program “Crashed”.
3. Logical Errors:
Sometimes, even if you don’t encounter any error
during compiling-time and runtime, your program does
not provide the correct result. This is because of the
programmer’s mistaken analysis of the problem he or
she is trying to solve. Such errors are called logical
error

TESTING

1. Alpha Testing:
It is the most common type of testing used in the software industry. The
objective of this testing is to identify all possible issues or defects before
releasing it into the market or to the user. It is conducted at the
developer’s site.

2. Beta Testing:
It is a formal type of software testing which is carried out by the
customers. It is performed in a real environment before releasing the
products into the market for the actual end-users. It is carried out to
ensure that there are no major failures in the software or product and it
satisfies the business requirement. Beta Testing is successful when the
customer accepts the software.

3. White Box Testing:


White box testing is based on the knowledge about the internal logic of
an application’s code. It is also known as Glass box Testing. Internal
Software and code working should be known for performing this type of
testing. These tests are based on the coverage of the code statements,
branches, paths, conditions etc.

4. Black Box Testing:


It is a software testing, method in which the internal structure or design
of the item to be tested is not known to the tester. This method of
testing can be applied virtually to every level of the software testing.
MAINTENANCE
Programming maintenance refers to the modifications in the
program. After it has been completed, in order to meet
changing requirement or to take care of the errors that
shown up. There are four types of maintenance:
1. Corrective Maintenance:
When the program after compilation shows error because
of some unexpected situations, untested areas such errors
are fixed up by Corrective maintenance.
2. Adaptive Maintenance:
Changes in the environment in which an information
system operates may lead to system management. To
accommodate changing needs time to time
maintenance is done and is called Adaptive
maintenance.

3. Preventive Maintenance:
If possible the errors could be anticipated before they
actually occur; the maintenance is called Preventive
maintenance.

4. Perfective Maintenance:
In this rapidly changing world, information technology is
the fastest growing area. If the existing system is
maintained to keep tuned with the new features, new
facilities, new capabilities, it is said to be Perfective
maintenance.

Cherry Cafe Management System


Problem Definition:
Design a robust backend application to streamline the
operations of Cherry Cafe, focusing on efficient order
processing, menu management, and invoicing.
Contribution:
TEAM MEMBERS' NAMES:
1. Sidharth
2. Renford
3. Lalith
Project Details:
The Cherry Cafe Management System is developed using
[insert backend framework, e.g., Node.js with Express,
Django, or Flask]. It allows for effective handling of API
requests and responses, implementing secure user
authentication and authorization mechanisms with [mention
libraries, e.g., JWT, OAuth].
Reason for Choosing This Topic:
The need for an efficient cafe management system became
apparent through observations of operational challenges in
food service establishments, particularly regarding long wait
times and order inaccuracies. A streamlined system could
greatly enhance customer satisfaction.
Objectives:
 Develop an efficient order processing system
 Implement menu management with real-time updates
 Generate invoices automatically upon order completion
 Enable secure payment processing
 Allow for customer feedback submission and
management
Limitations:

 User Authentication:
 There is no user login system, which could lead to
unauthorized access to the database.
 Data Validation:
 The program lacks thorough input validation, which may
cause issues if users enter invalid data (e.g., non-numeric
quantities).
 Concurrency Issues:
 The current implementation does not handle multiple
users accessing the system simultaneously, which could
lead to data integrity issues.
 Limited Functionality:
 The program focuses solely on basic cart operations
without advanced features like search, filtering, or
sorting of items.
 No Persistent Cart:
 The cart is cleared upon program exit; there’s no
mechanism to save cart data for future sessions.
 Error Handling:
 There is minimal error handling; unexpected errors could
cause the program to crash without user-friendly
feedback.
 No Item Removal Confirmation:
 When deleting items from the cart, there’s no
confirmation prompt to prevent accidental deletions.
 Fixed Menu Items:
 The menu items are hardcoded, requiring code changes
to update or add new items instead of allowing dynamic
management through a user interface.
 Limited Reporting:
 The invoice generation is basic and lacks detailed
reporting features, such as sales summaries or item
popularity.
 No User Interface:
 The interaction is purely text-based in the console, which
may not be user-friendly for all users compared to a
graphical user interface (GUI).
FLOW CHART

╔════════════════╗
║ START ║
╚════════════════╝


╔═══════════════════════════╗
║ Connect to Database ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ Create Database & Tables ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ Insert Menu Items ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ Main Menu ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ View Items / Cart ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ Add / Update / Delete ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ Generate Invoice ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ EXIT ║
╚═══════════════════════════╝


╔═══════════════════════════╗
║ END ║
╚═══════════════════════════╝

import mysql.connector as ms

# Connect to the MySQL database


con = ms.connect(host='localhost', user='root', passwd='arthurxd67')
cur = con.cursor()

# Create database and table if they don't exist


cur.execute('CREATE DATABASE IF NOT EXISTS Cherry_cafe')
cur.execute('USE Cherry_cafe')
# Create ITEMS table with descriptions
cur.execute("""
CREATE TABLE IF NOT EXISTS ITEMS (
ITEM_ID CHAR(3) PRIMARY KEY,
ITEM_NAME VARCHAR(20),
PRICE INT,
DESCRIPTION VARCHAR(100)
)
""")
cur.execute("""
CREATE TABLE IF NOT EXISTS CART (
ITEM_NAME VARCHAR(20),
QTY INT )
""")

# Menu items with descriptions


items = [
('A01', 'Cheesecake', 200, 'Creamy cheesecake with a graham cracker crust.'),
('A02', 'Brownie Box', 700, 'Assorted brownies in a box.'),
('A03', 'Mocha Espresso', 150, 'Espresso blended with chocolate.'),
('A04', 'Dream Cake', 750, 'Fluffy cake with fruit toppings.'),
('A05', 'Mystery Cake', 1000, 'Surprise flavors in every slice!'),
('A06', 'Milkshake', 250, 'Thick and creamy milkshake.'),
('A07', 'Pizza', 260, 'Freshly baked pizza with toppings.'),
('A08', 'Curry Bun', 70, 'Soft bun filled with spicy curry.'),
('A09', 'French Fries', 200, 'Crispy fries with dips.'),
('A10', 'Churros (10 pcs)', 200, 'Crispy churros sprinkled with sugar.')
]
# Insert items into the ITEMS table
for item in items:
cur.execute("INSERT IGNORE INTO ITEMS VALUES (%s, %s, %s, %s)", item)

# Function to view menu items


def view_items():
print("| ID | NAME | PRICE | DESCRIPTION |")
cur.execute("SELECT * FROM ITEMS")
for row in cur.fetchall():
print(f"| {row[0]} | {row[1]:<15} | {row[2]:<5} | {row[3]:<40} |")

# Function to add items to cart


def add_to_cart():
item_name = input("Enter the item name: ")
qty = int(input("Enter quantity: "))
cur.execute("INSERT INTO CART (ITEM_NAME, QTY) VALUES (%s, %s)",
(item_name, qty))
con.commit()

# Function to view cart items


def view_cart():
print("| NAME | QTY |")
print("--------------------------")
cur.execute("SELECT ITEM_NAME, QTY FROM CART")
rows = cur.fetchall()
if not rows:
print("Cart is empty.")
else:
for row in rows:
print(f"| {row[0]:<15} | {row[1]:<3} |")
def update_cart():
name = input('Enter item name to modify: ')
q = int(input('Modify quantity: '))
cur.execute("UPDATE CART SET QTY = %s WHERE ITEM_NAME = %s", (q, name))
if cur.rowcount == 0:
print(f"Item '{name}' not found in the cart.")
else:
print("Updated cart.")
view_cart()

def delete_cart():
name = input('Enter item name to delete: ')
cur.execute("DELETE FROM CART WHERE ITEM_NAME = %s", (name,))
if cur.rowcount == 0:
print(f"Item '{name}' not found in the cart.")
else:
print("Updated cart.")
view_cart()

# Function to generate an invoice


def generate_invoice():
cur.execute("SELECT ITEM_NAME, QTY FROM CART")
rows = cur.fetchall()

if not rows:
print("Cart is empty, cannot generate invoice.")
return

print("\n----- INVOICE -----")


print("| ITEM NAME | QTY | PRICE | TOTAL |")
print("-----------------------------------------")

total_amount = 0
for item_name, qty in rows:
cur.execute("SELECT PRICE FROM ITEMS WHERE ITEM_NAME = %s",
(item_name,))
price_row = cur.fetchone()
if price_row:
price = price_row[0]
total = price * qty
total_amount += total
print(f"| {item_name:<15} | {qty:<3} | {price:<5} | {total:<6} |")

print("-----------------------------------------")
print(f"Total Amount: {total_amount}")
print("------------------------------")
print("Thank you for your purchase!")

# Main program loop


print("WELCOME TO CHERRY CAFE")
while True:
print("""
MAIN MENU
1. View Items
2. Add to Cart
3. View Cart
4. Update Cart
5. Delete Cart
6. Generate Invoice
7. Exit
""")

option = int(input("Enter your option: "))


if option == 1:
view_items()
elif option == 2:
add_to_cart()
elif option == 3:
view_cart()
elif option == 4:
update_cart()
elif option == 5:
delete_cart()
elif option == 6:
generate_invoice()
elif option == 7:
print(‘THANK YOU FOR VISITING’)
break
else:
print("Invalid option, please try again.")

# Close the database connection


cur.close()
con.close()

OUTPUT
WELCOME TO CHERRY CAFE
MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 1

| ID | NAME | PRICE | DESCRIPTION |

| A01 | Cheesecake | 200 | Creamy cheesecake with a graham cracker crust. |

| A02 | Brownie Box | 700 | Assorted brownies in a box. |

| A03 | Mocha Espresso | 150 | Espresso blended with chocolate. |

| A04 | Dream Cake | 750 | Fluffy cake with fruit toppings. |

| A05 | Mystery Cake | 1000 | Surprise flavors in every slice! |

| A06 | Milkshake | 250 | Thick and creamy milkshake. |

| A07 | Pizza | 260 | Freshly baked pizza with toppings. |

| A08 | Curry Bun | 70 | Soft bun filled with spicy curry. |

| A09 | French Fries | 200 | Crispy fries with dips. |

| A10 | Churros (10 pcs) | 200 | Crispy churros sprinkled with sugar. |

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit
Enter your option: 2

Enter the item name: cheesecake

Enter quantity: 3

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 2

Enter the item name: milkshake

Enter quantity: 4

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 3

| NAME | QTY |

--------------------------
| cheesecake |3 |

| milkshake |4 |

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 4

Enter item name to modify: milkshake

Modify quantity: 3

Updated cart.

| NAME | QTY |

--------------------------

| cheesecake |3 |

| milkshake |3 |

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit
Enter your option: 5

Enter item name to delete: milkshake

Updated cart.

| NAME | QTY |

--------------------------

| cheesecake |3 |

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 6

----- INVOICE -----

| ITEM NAME | QTY | PRICE | TOTAL |

-----------------------------------------

| cheesecake | 3 | 200 | 600 |

-----------------------------------------

Total Amount: 600

------------------------------

Thank you for your purchase!

MAIN MENU

1. View Items

2. Add to Cart
3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 9

Invalid option, please try again.

MAIN MENU

1. View Items

2. Add to Cart

3. View Cart

4. Update Cart

5. Delete Cart

6. Generate Invoice

7. Exit

Enter your option: 7

THANK YOU FOR VISITING

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