0% found this document useful (0 votes)
23 views52 pages

Jyotirmoy

Uploaded by

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

Jyotirmoy

Uploaded by

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

A VIDYALAYA

IY CR
DR P

EN

F
ri K

Am
PM Sh

erigog
A Project Report on

FOOD ORDER SYSTEM


For

AISSCE 2024-25 Examination


[As a part of the Computer science course 083]

Submitted by:

Student Name 1: ANTARICKSH DEV

Student Name 2:DIPANKAR DEBNATH

Student Name 3:_JYOTIRMOY NATH

Under the Guidance of:

Mrs. Neha Tyagi

PGT (Comp.Sc)

1|Page
CERTIFICATE

This is to certify that the Project / Dissertation entitled _ FOOD


ORDER SYSTEM_ is a bonafide work done by JYOTIRMOY NATH of class
XII Session 2024-25 in partial fulfillment of CBSE’s AISSCE Examination
2024-25 and has been carried out under my direct supervision and guidance.

Signature of Student Signature of Teacher

Name: JYOTIRMOY NATH Name: Mrs. Neha Tyagi

Roll No.: ______________ Designation:PGT (Comp.Sc.)

2|Page
ACKNOWLEDGEMENT

I undertook this Project work, as the part of my XII-CS course. I had


tried to apply my best of knowledge and experience, gained during the study
and class work experience. However, developing software system 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.

I would like to extend my sincere thanks and gratitude to my teacher


Mrs. Neha Tyagi. I am very much thankful to our Principal Mrs Indira S
Buragohain for providing valuable infrastructure, moral support which
encourages me to develop this project in better way.

I would like to take the opportunity to extend my sincere thanks and


gratitude to my parents for being a source of inspiration and providing time
and freedom to develop this software project.

I also feel indebted to my friends for the valuable suggestions during


the project work.

3|Page
INDEX

1. Introduction----------------------------------------------.6
2. Feature of Python & MySQL-------------------------.7
3. The features of MySQL are as follows:------------.9
4. System Requirements--------------------------------.10
5. Source Code----------------------------------------.11-32
6. Screen Shot---------------------------------------------.33
Sql database-
i. Main table--------------------------------------.33
ii. Customer table-------------------------------.34
iii. Employee table-------------------------------.35
iv. Feedback table-------------------------------.36
v. Food table-------------------------------------.37
vi. Orderfood table------------------------------.38
Python output-
i. Main menu-------------------------------------.39
ii. Employee menu------------------------------.40
iii. Customer menu-------------------------------.41
iv. Food menu-------------------------------------.42
v. Orderfood menu------------------------------.43
vi. view----------------------------------------------.44

4|Page
• Employee details-------------------44
• Customer details------------------.45
• Food details------------------------.46
• Orederfood details----------------.47
• Feedback details------------------.48
• Return to main manu-------------.49
vii. Feedback menu-------------------------.50
viii. Exit menu--------------------------------.51

7. Bibliography/Reference-----------------------------.52

5|Page
Introduction

This project is developed to automate the functionalities of a Food Hub.The


purpose of the software project is to develop the Management Information
System (MIS) to automate the record keeping in digital form with a view to
enhance the decision making of the functionaries.

A MIS mainly consists of a computerized database, a collection of inter-


related tables for a particular subject or purpose, capable to produce different
reports relevant to the user. An application program is tied with the database for
easy access and interface to the database. Using Application program or front-
end, we can store, retrieve and manage all information in proper way.

This software, being simple in design and working, does not require much
of training to users, and can be used as a powerful tool for automating a Food
Hub.

During coding and design of the software Project, Python, a powerful tool is
used apart from this a powerful, open source RDBMS, My SQL is used as per
requirement of the CBSE curriculum of Computer Science Course.

6|Page
Feature of Python & MySQL
Python is a dynamic, high level, free open source and interpreted
programming language. It supports object-oriented programming as well as
procedural oriented programming.

There are many features in Python, some of which are discussed below –

1. Easy to code: Python is high level programming language.Python is very easy to


learn language as compared to other language like c, c#, java script, java etc.It is
very easy to code in python language and anybody can learn python basic in few
hours or days.It is also developer-friendly language.

2. Free and Open Source: Python language is freely available at official website
and you can download it from the given download link below click on the
Download Python kyeword.

3. Object-Oriented Language: One of the key features of python is Object-


Oriented programming.Python supports object oriented language and concepts
of classes, objects encapsulation etc.

4. GUI Programming Support: Graphical Users interfaces can be made using a


module such as PyQt5, PyQt4, wxPython or Tk in python.

5. High-Level Language: Python is a high-level language.When we write programs


in python, we do not need to remember the system architecture, nor do we need
to manage the memory.

6. Extensible feature: Python is a Extensible language.we can write our some


python code into c or c++ language and also we can compile that code in c/c++
language.

7. Python is Portable language: Python language is also a portable language.for


example, if we have python code for windows and if we want to run this code on
other platform such as Linux, Unix and Mac then we do not need to change it, we
can run this code on any platform.

7|Page
8. Python is Integrated language: Python is also an Integrated language because
we can easily integrated python with other language like c, c++ etc.

9. Interpreted Language: Python is an Interpreted Language. because python code


is executed line by line at a time. like other language c, c++, java etc there is no
need to compile python code this makes it easier to debug our code.The source
code of python is converted into an immediate form called bytecode.

10. Large Standard Library: Python has a large standard library which provides rich
set of module and functions so you do not have to write your own code for every
single thing.There are many libraries present in python for such as regular
expressions, unit-testing, web browsers etc.

11. Dynamically Typed Language: Python is dynamically-typed language. That


means the type (for example- int, double, long etc) for a variable is decided at run
time not in advance.because of this feature we don’t need to specify the type of
variable.

8|Page
The features of MySQL are
as follows:

1. Ease of Management – The software very easily gets downloaded and also uses
an event scheduler to schedule the tasks automatically.
2. Robust Transactional Support – Holds the ACID (Atomicity, Consistency,
Isolation, Durability) property, and also allows distributed multi-version
support.
3. Comprehensive Application Development – MySQL has plugin libraries to
embed the database into any application. It also supports stored procedures,
triggers, functions, views and many more for application development.
4. High Performance – Provides fast load utilities with distinct memory caches
and table index partitioning.
5. Low Total Cost Of Ownership – This reduces licensing costs and hardware
expenditures.
6. Open Source & 24 * 7 Support – This RDBMS can be used on any platform and
offers 24*7 support for open source and enterprise edition.
7. Secure Data Protection – MySQL supports powerful mechanisms to ensure
that only authorized users have access to the databases.
8. High Availability – MySQL can run high-speed master/slave replication
configurations and it offers cluster servers.
9. Scalability & Flexibility – With MySQL you can run deeply embedded
applications and create data warehouses holding a humongous amount of
data.

9|Page
System Requirement
Recommended System Requirements

Processors: Intel® Core™ i5 processor 4300M at 2.60 GHz or 2.59 GHz (1


socket, 2 cores, 2 threads per core), 8 GB of DRAMIntel® Xeon® processor
E5-2698 v3 at 2.30 GHz (2 sockets, 16 cores each, 1 thread per core), 64 GB
of DRAMIntel® Xeon Phi™ processor 7210 at 1.30 GHz (1 socket, 64 cores,
4 threads per core), 32 GB of DRAM, 16 GB of MCDRAM (flat mode
enabled)

Disk space: 2 to 3 GB

Operating systems: Windows® 10, macOS*, and Linux*

Minimum System Requirements

Processors: Intel Atom® processor or Intel® Core™ i3 processor

Disk space: 1 GB

Operating systems: Windows* 7 or later, macOS, and Linux

Python* versions: 2.7.X, 3.6.X

Recommended System Requirements (My SQL)

CPU: Intel Core or Xeon 3GHz (or Dual Core 2GHz) or equal AMDCPU.

Cores: Single (Dual/Quad Core is recommended)

RAM: 4 GB (6 GB recommended)

Graphic Accelerators: nVidia or ATI with support of OpenGL 1.5 or higher.

Display Resolution: 1280×1024 is recommended, 1024×768 is minimum.

10 | P a g e
Source Code
import os

import platform

import mysql.connector

import pandas as pd

from datetime import date

# Connect to the MySQL database

mydb = mysql.connector.connect(host="localhost",
user="root", password="W7301@jqir#", database="food1")

mycursor = mydb.cursor()

# Creating Tables if they do not exist

mycursor.execute("""

CREATE TABLE IF NOT EXISTS Employee (

Emp_id INT AUTO_INCREMENT PRIMARY KEY,

ename VARCHAR(255) NOT NULL,

emp_g VARCHAR(10),

11 | P a g e
eage INT,

emp_phone BIGINT,

pwd VARCHAR(255)

""")

mycursor.execute("""

CREATE TABLE IF NOT EXISTS Customer (

c_id INT AUTO_INCREMENT PRIMARY KEY,

name VARCHAR(255) NOT NULL,

cphone BIGINT,

payment INT,

pstatus VARCHAR(20),

email VARCHAR(255),

orderid INT,

date DATE

""")

12 | P a g e
mycursor.execute("""

CREATE TABLE IF NOT EXISTS Food (

Food_id INT AUTO_INCREMENT PRIMARY KEY,

Foodname VARCHAR(255) NOT NULL,

Food_size VARCHAR(20),

prize INT

""")

mycursor.execute("""

CREATE TABLE IF NOT EXISTS OrderFood (

Orderf_id INT AUTO_INCREMENT PRIMARY KEY,

C_id INT,

Emp_id INT,

Food_id INT,

Food_qty INT,

Total_price INT

""")
13 | P a g e
mycursor.execute("""

CREATE TABLE IF NOT EXISTS Feedback (

feedback_id INT AUTO_INCREMENT PRIMARY KEY,

c_id INT,

feedback_text TEXT,

feedback_date DATE,

FOREIGN KEY (c_id) REFERENCES Customer(c_id)

""")

# Function to collect customer feedback

def Feedback():

L = []

while True:

try:

c_id = int(input("Enter the Customer ID: ").strip())

14 | P a g e
mycursor.execute("SELECT c_id FROM Customer
WHERE c_id = %s", (c_id,))

if mycursor.fetchone() is not None:

break

else:

print("Customer ID does not exist. Please enter a


valid Customer ID.")

except ValueError:

print("Invalid Customer ID. Please enter a number.")

L.append(c_id)

feedback_text = input("Enter your feedback: ").strip()

L.append(feedback_text)

feedback_date = date.today()

L.append(feedback_date)

feedback_data = tuple(L)

15 | P a g e
sql = "INSERT INTO Feedback (c_id, feedback_text,
feedback_date) VALUES (%s, %s, %s)"

mycursor.execute(sql, feedback_data)

mydb.commit()

print("Thank you for your feedback!")

# Function to get food price based on Food_id

def get_food_price(Food_id):

mycursor.execute("SELECT prize FROM Food WHERE


Food_id = %s", (Food_id,))

result = mycursor.fetchone()

return result[0] if result else 0

# Function to add a customer

def Customer():

L = []

name = input("Enter the Customer Name: ").strip()

L.append(name)

16 | P a g e
while True:

try:

cphone = int(input("Enter customer phone number:


").strip())

if len(str(cphone)) == 10:

break

else:

print("Phone number should be 10 digits. Try


again.")

except ValueError:

print("Invalid phone number. Please enter a valid


number.")

L.append(cphone)

payment = input("Enter payment method (1 for Credit


Card, 2 for Debit Card): ").strip()

while payment not in ['1', '2']:

print("Invalid choice. Please choose 1 for Credit Card


or 2 for Debit Card.")

17 | P a g e
payment = input("Enter payment method (1 for Credit
Card, 2 for Debit Card): ").strip()

L.append(int(payment))

pstatus = input("Enter the payment status (e.g., Paid,


Pending): ").strip()

L.append(pstatus)

email = input("Enter the email id: ").strip()

L.append(email)

orderid = input("Enter order ID: ").strip()

L.append(orderid)

date = input("Enter the Date (YYYY-MM-DD): ").strip()

L.append(date)

cust = tuple(L)

18 | P a g e
sql = "INSERT INTO Customer (name, cphone, payment,
pstatus, email, orderid, date) VALUES (%s, %s, %s, %s,
%s, %s, %s)"

mycursor.execute(sql, cust)

mydb.commit()

print("Customer added successfully!")

# Function to add an employee

def Employee():

L = []

ename = input("Enter the Employee Name: ").strip()

L.append(ename)

emp_g = input("Enter Employee Gender (M/F):


").strip().upper()

L.append(emp_g)

while True:

try:

19 | P a g e
eage = int(input("Enter Employee age: ").strip())

if eage > 0:

break

else:

print("Age must be a positive number.")

except ValueError:

print("Invalid input for age. Please enter a number.")

L.append(eage)

while True:

try:

emp_phone = int(input("Enter employee phone


number: ").strip())

if len(str(emp_phone)) == 10:

break

else:

print("Phone number should be 10 digits. Try


again.")

except ValueError:

20 | P a g e
print("Invalid phone number. Please enter a valid
number.")

L.append(emp_phone)

pwd = input("Enter the password: ").strip()

L.append(pwd)

EMP = tuple(L)

sql = "INSERT INTO Employee (ename, emp_g, eage,


emp_phone, pwd) VALUES (%s, %s, %s, %s, %s)"

mycursor.execute(sql, EMP)

mydb.commit()

print("Employee added successfully!")

# Function to add food item

def Food():

L = []

Foodname = input("Enter the Food Name: ").strip()

L.append(Foodname)

21 | P a g e
Food_size = input("Enter Food size
(Small/Medium/Large): ").strip().capitalize()

L.append(Food_size)

while True:

try:

prize = int(input("Enter Price of Food: ").strip())

if prize > 0:

break

else:

print("Price must be a positive number.")

except ValueError:

print("Invalid input for price. Please enter a


number.")

L.append(prize)

Food_data = tuple(L)

22 | P a g e
sql = "INSERT INTO Food (Foodname, Food_size, prize)
VALUES (%s, %s, %s)"

mycursor.execute(sql, Food_data)

mydb.commit()

print("Food item added successfully:", Food_data)

# Function to place a food order

def OrderFood():

L = []

while True:

try:

C_id = int(input("Enter the Customer ID: ").strip())

break

except ValueError:

print("Invalid Customer ID. Please enter a number.")

L.append(C_id)

while True:

23 | P a g e
try:

Emp_id = int(input("Enter Employee ID: ").strip())

break

except ValueError:

print("Invalid Employee ID. Please enter a number.")

L.append(Emp_id)

while True:

try:

Food_id = int(input("Enter Food ID: ").strip())

mycursor.execute("SELECT Food_id FROM Food


WHERE Food_id = %s", (Food_id,))

if mycursor.fetchone() is not None:

break

else:

print("Food ID does not exist. Please enter a valid


Food ID.")

except ValueError:

print("Invalid Food ID. Please enter a number.")

24 | P a g e
L.append(Food_id)

while True:

try:

Food_qty = int(input("Enter Quantity: ").strip())

if Food_qty > 0:

break

else:

print("Quantity must be a positive number.")

except ValueError:

print("Invalid input for quantity. Please enter a


number.")

L.append(Food_qty)

Total_price = Food_qty * get_food_price(Food_id)

L.append(Total_price)

Order_data = tuple(L)

25 | P a g e
sql = "INSERT INTO OrderFood (C_id, Emp_id, Food_id,
Food_qty, Total_price) VALUES (%s, %s, %s, %s, %s)"

mycursor.execute(sql, Order_data)

mydb.commit()

print("Order placed successfully! Total price:",


Total_price)

# Function to display a boxed view menu

def display_view_menu_box():

view_options = [

"1. View Employee Details",

"2. View Customer Details",

"3. View Food Details",

"4. View Order Details",

"5. View Feedback",

"6. Return to Main Menu"

print("╔" + "═" * 38 + "╗")

26 | P a g e
print("║" + " " * 38 + "║")

print("║" + " " * 12 + "VIEW MENU" + " " * 15 + "║")

print("║" + " " * 38 + "║")

print("╠" + "═" * 38 + "╣")

for option in view_options:

print(f"║ {option}{' ' * (34 - len(option))}║")

print("╚" + "═" * 38 + "╝")

# Modified View function with the boxed view menu

def View():

display_view_menu_box()

try:

choice = int(input("Please select an option (1-6):


").strip())

if choice == 1:

mycursor.execute("SELECT * FROM Employee")

27 | P a g e
records = mycursor.fetchall()

print("\nEmployee Details:")

for record in records:

print(record)

elif choice == 2:

mycursor.execute("SELECT * FROM Customer")

records = mycursor.fetchall()

print("\nCustomer Details:")

for record in records:

print(record)

elif choice == 3:

mycursor.execute("SELECT * FROM Food")

records = mycursor.fetchall()

print("\nFood Details:")

for record in records:

print(record)

elif choice == 4:

mycursor.execute("SELECT * FROM OrderFood")

records = mycursor.fetchall()
28 | P a g e
print("\nOrder Details:")

for record in records:

print(record)

elif choice == 5:

mycursor.execute("SELECT * FROM Feedback")

records = mycursor.fetchall()

print("\nFeedback:")

for record in records:

print(record)

elif choice == 6:

print("Returning to main menu.")

else:

print("Invalid choice! Please enter a number


between 1 and 6.")

except ValueError:

print("Invalid input! Please enter a number.")

# Function to display the boxed main menu

def display_menu_box():

29 | P a g e
options = [

"1. Employee Menu",

"2. Customer Menu",

"3. Food Menu",

"4. Order Food Menu",

"5. View Menu",

"6. Feedback Menu",

"7. Exit"

print("╔" + "═" * 38 + "╗")

print("║" + " " * 38 + "║")

print("║" + " " * 12 + "MAIN MENU" + " " * 14 + "║")

print("║" + " " * 38 + "║")

print("╠" + "═" * 38 + "╣")

for option in options:

print(f"║ {option}{' ' * (34 - len(option))}║")

30 | P a g e
print("╚" + "═" * 38 + "╝")

# Main menu function

def MenuSet():

display_menu_box()

try:

userInput = int(input("Please select an option (1-7):


").strip())

if userInput == 1:

Employee()

elif userInput == 2:

Customer()

elif userInput == 3:

Food()

elif userInput == 4:

OrderFood()

elif userInput == 5:

View()

elif userInput == 6:

31 | P a g e
Feedback()

elif userInput == 7:

print("Exiting program.")

exit()

else:

print("Invalid choice! Please enter a number


between 1 and 7.")

except ValueError:

print("Invalid input! Please enter a number.")

# Run the main menu

MenuSet()

32 | P a g e
------------------SQL DATABASE-------------

USE OF DATABASE AND SHOW ALL TABLE IN THE


DATABASE:

33 | P a g e
----------------------- CUSTOMER TABLE-----------------------

DESCRIBE CUSTOMER TABLE:

DATA IN CUSTOMER TABLE:

34 | P a g e
-----------------------EMPLOYEE TABLE-------------------------

DESCRIBE EMPLOYEE TABLE:

DATA IN EMPLOYEE TABLE:

35 | P a g e
---------------------FEEDBACK TABLE----------------------

DESCRIBE FEEDBACK TABLE:

DATA IN FEEDBACK TABLE

36 | P a g e
--------------------------FOOD TABLE----------------------

DESCRIBE FOOD TABLE:

DATA IN FOOD TABLE

37 | P a g e
---------------------ORDERFOOD TABLE------------------

DESCRIBE ORDERFOOD TABLE:

DATA IN ORDER TABLE

38 | P a g e
----------------------- OUTPUT -----------------------

MAIN MENU

39 | P a g e
1.EMPLOYEE MENU-

40 | P a g e
2.CUSTOMER MENU-

41 | P a g e
3.FOOD MENU-

42 | P a g e
4.ORDER FOOD MENU-

43 | P a g e
5.VIEW MENU-

i.EMPLOYEE DETAILS-

44 | P a g e
ii.CUSTOMER DETAILS-

45 | P a g e
iii.FOOD DETAILS-

46 | P a g e
iv.ORDER FOOD DETAILS-

47 | P a g e
V.FEEDBACK MENU-

48 | P a g e
vi.RETURN TO MAIN MENU-

49 | P a g e
6.FEEDBACK MENU-

50 | P a g e
7.EXIT MENU-

51 | P a g e
Bibliography/Reference
In order to work on this project, the following books and literature are
referred by me during the various phases of development of the project:

Reference Book:
Computer Science by : Sumita Arora

Computer Science by : Preeti Arora

Reference Websites:
www.google.com

www.python.org

www.w3schools.com

www.mysql.com

www.mysqltutorial.org

www.pythontrends.wordpress.com

52 | P a g e

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