0% found this document useful (0 votes)
19 views20 pages

DHARMA

The document describes a mini project report on developing an online food ordering system. It outlines the problem statement, methodology, flowchart, coding in Python, modules used, results and screenshots, and conclusion.

Uploaded by

hacic55106
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)
19 views20 pages

DHARMA

The document describes a mini project report on developing an online food ordering system. It outlines the problem statement, methodology, flowchart, coding in Python, modules used, results and screenshots, and conclusion.

Uploaded by

hacic55106
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/ 20

ONLINE FOOD ORDERING SYSTEM

21CSS101J – PROGRAMMING FOR PROBLEM-SOLVING

Mini Project Report

Submitted by

D KISHORE [Reg. No.: RA2311004010531]


B.Tech. ECE
M GOPI [Reg. No.: RA2311004010525]
B.Tech. ECE

SCHOOL OF COMPUTING
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
(Under Section 3 of UGC Act, 1956)
S.R.M. NAGAR, KATTANKULATHUR – 603 203
CHENGALPATTU DISTRICT

November 2023

1|Page
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
(Under Section 3 of UGC Act, 1956)
S.R.M. NAGAR, KATTANKULATHUR – 603 203

BONAFIDE CERTIFICATE

Certified that Mini project report titled ONLINE FOOD ORDERING SYSTEM is the bonafide work of
Reg.No RA2311004010531,RA2311004010525 Name D KISHORE , M GOPI who carried out the minor
project under my supervision. Certified further, that to the best of my knowledge, the work reported herein
does not form any other project report or dissertation on the basis of which a degree or award was conferred
on an earlier occasion on this or any other candidate.

SIGNATURE SIGNATURE

Dr. S.Bashyam Dr.M.Vasanthi

Assistant Professor Year Coordinator


Department of ECE Department of ECE
SRMIST SRMIST

Kattankulathur Kattankulathur

2|Page
3|Page
TABLE OF CONTENTS

S No. Title Page No.

4
1 Problem Statement

4
2 Methodology / Procedure/ Algorithm
7
3 Flowchart

8
4 Coding (C/Python)

16
5 Modules of the proposed work

20
6 Results/Screenshots

22
7 Conclusion

22
8 References

4|Page
1.Problem Statement

Error Handling: The code should be improved to handle unexpected user inputs, such as non-
integer values when selecting food items, invalid reference numbers, or incorrect choices,
without causing the program to crash or exhibit unexpected behaviour.

Input Validation: The system should validate user inputs to ensure that they conform to the
expected input formats, such as integers for food item selection and valid reference numbers
for receipt viewing.

Data Integrity: Ensure that the code correctly stores and retrieves order information and
reference numbers to provide accurate receipts.

User Experience: Enhance the user interface to make it more userfriendly and informative,
with clear instructions and feedback at each step of the ordering and receipt viewing processes.

Documentation: Create documentation that explains the code's functionality and usage,
making it easier for developers to understand and modify as needed .

5|Page
2.Methodology / Procedure/ Algorithm

Methodology

Error Handling: Implement error handling to gracefully handle unexpected user inputs and
prevent program crashes or unexpected behavior.

Input Validation: Implement input validation to ensure user inputs adhere to expected formats,
such as integers for food item selection and valid reference numbers.

User Experience: Improve the user interface by providing clear instructions, meaningful error
messages, and user-friendly prompts.

Data Integrity: Ensure the system correctly sto res and retrieves order information and
reference numbers to generate accurate and consistent receipts.

Documentation: Develop comprehensive documentation that explains the code's functionality,


usage, and important variables or functions.

Procedure
Import necessary libraries:
import random
import pickle
import math
import datetime

• Define functions for different menu options (LUNCH, CHAT_ITEMS, DINNER) to display
available items.

• Print the main menu and prompt the user for their choice: print("BILLING SYSTEM") # ...
a = int(input("ENTER YOUR CHOICE: "))

6|Page
• If the user selects option 1 (ORDER FOOD), proceed to order food, handling input errors
and validation.

• If the user selects option 2 (VIEW RECEIPT), prompt for a reference number and display
the online receipt.

• Implement error handling and input validation as needed in the code to ensure smooth user
interactions.

• Generate a random reference number for each order.

• Create a list of items with their names and prices.

• Retrieve the user's order, validate it, and store it in the "ab" list.

• Prompt the user if they want to print the receipt. If yes, generate and print the online receipt.

• Store the order information (including the reference number) in the "FOOD.dat" file using
pickle

7|Page
3.Flow chart

START

ONLINE FOOD ORDERING


SYSTEM

1)ORDER FOOD

2)VIEW RECEIPT

Case.1
Display main menu

Case.2 Need
receipt(y/n)

ENTER RECEIPT
NO:

EXIT

8|Page
8

B
A

Case.4 Search member

Case.5 Save member

Case.6 View member

Case.7 Invalid choice. Please try again

4. Coding (C/Python)

import random
import pickle
import math
import datetime

def LUNCH():
print(" ITEMS AVAILABLE ")
9|Page
print("")
print(" 1) CHICKEN RICE - ₹ 120")
print(" 2) CHICKEN NOODELS - ₹ 100")
print(" 3) BOILED EGG - ₹ 20")
print(" 4) PANNER CURRY - ₹ 80")
print(" 5) GHEE RICE - ₹ 60")
print(" 6) PARATHA - ₹ 50")
print(" 7) MUTTON GRAVY - ₹ 90")
print(" 8) CHICKEN GRAVY - ₹ 70")
print(" 9) CHANNA MASALA - ₹ 60")
print(" 10) CHAPPATHI - ₹ 30")
print(" 11) CHOLA PURI - ₹ 50")
print(" 12) FULL MEALS - ₹ 100")
print(" 13) CHICKEN BRIYANI - ₹ 150")
print(" 14) MUTTON BRIYANI - ₹ 200")

def CHAT_ITEMS():
print(" CHAT ITEMS")
print("")
print(" 1) ALOO PURI - ₹ 35")
print(" 2) ALOO CHAT - ₹ 35")
print(" 3) BHEL PURI - ₹ 40")
print(" 4) MASALA BHEL PURI - ₹ 45")
print(" 5) FRUIT BHEL PURI - ₹ 45")
print(" 6) CHURMUR CHAT - ₹ 30")
print(" 7) JAHL MODI - ₹ 35")
print(" 8) PANI PURI - ₹ 35")
print(" 9) SEV PURI - ₹ 35")

def DINNER():
print(" ITEMS AVAILABLE ")
print("")
print(" 1) GHEE ROAST MASALA - ₹ 60")
print(" 2) VADA ( ALL VARIETY ) - ₹ 30")
print(" 3) VEG BIRIYANI - ₹ 100")
print(" 4) CHEESE DOSA - ₹ 70")
print(" 5) ONION DOSA - ₹ 65")
print(" 6) IDLY - ₹ 45")
print(" 7) CHAPPATHI - ₹ 65")
print(" 8) CHICKEN 65 - ₹ 100")
print(" 9) GOBI 65 - ₹ 70")
print(" 10) PAROTTA - ₹ 60")
print(" 11) SOUP (VEG,MUSHROOM) - ₹ 50")
print(" 12) SAMBAR RICE - ₹ 50")

10 | P a g e
print(" BILLING SYSTEM")
print("")
print(" NH - 45 FOOD COURT")
print("")

print(" 1) ORDER FOOD")


print(" 2) VIEW RECEIPT")
print("")

a = int(input(" ENTER YOUR CHOICE : "))


print("")

if a == 1:
print(" ORDER FOOD")
print("")
print(" SELECT TIME ")
print("")
print(" 1) LUNCH")
print(" 2) CHAT ITEMS")
print(" 3) DINNER")
print("")

aa = int(input(" SELECT OPTION : "))


print("")
csd = random.randrange(10000, 50000)
print(" REFERENCE NO. :", csd)
print("")

if aa == 1:
LUNCH()
print("")
print(" TYPE IN ITEM NO. SEPARATED WITH COMMAS")
print("")
s = eval(input(" ITEMS REQUIRED :"))
LIST_ITEMS = [
[1, "CHICKEN RICE ", "₹", " 120"],
[2, "CHICKEN NOODELS ", "₹", " 100"],
[3, "BOILED EGG", "₹", "20"],
[4, "PANNER CURRY", "₹", "80"],
[5, "GHEE RICE ", "₹", "60"],
[6, "PARATHA", "₹", "50"],
[7, "MUTTON GRAVY", "₹", "90"],
[8, "CHICKEN GRAVY", "₹", "70"],
[9, "CHANNA MASALA", "₹", "60"],

11 | P a g e
[10, "CHAPPATHI", "₹", "30"],
[11, "CHOLA PURI", "₹", "50"],
[12, "FULL MEALS", "₹", "100"],
[13, "CHICKEN BRIYANI", "₹", "150"],
[14, "MUTTON BRIYANI", "₹", "200"]
]
ab = []
if type(s) == int:
for j in range(0, 14):
if LIST_ITEMS[j][0] == s:
ab.append(LIST_ITEMS[j])
else:
for i in s:
for j in range(0, 14):
if LIST_ITEMS[j][0] == int(i):
ab.append(LIST_ITEMS[j])
elif aa == 2:
CHAT_ITEMS()
print("")
print(" TYPE IN ITEM NO. SEPARATED WITH COMMAS")
print("")
s = eval(input(" ITEMS REQUIRED :"))

LIST_ITEMS = [
[1, "ALOO PURI", "₹", "35"],
[2, "ALOO CHAT", "₹", "35"],
[3, "BHEL PURI", "₹", "40"],
[4, "MASALA BHEL PURI", "₹", "45"],
[5, "FRUIT BHEL PURI", "₹", "30"],
[6, "CHURMUR CHAT", "₹", "30"],
[7, "JAHL MODI", "₹", "35"],
[8, "PANI PURI", "₹", "35"],
[9, "SEV PURI", "₹", "35"]
]
ab = []
if type(s) == int:
for j in range(0, 9):
if LIST_ITEMS[j][0] == s:
ab.append(LIST_ITEMS[j])

else:
for i in s:
for j in range(0,9):
if LIST_ITEMS[j][0]==int(i):
ab.append(LIST_ITEMS[j])
elif aa == 3:

12 | P a g e
DINNER()
print("")
print(" TYPE IN ITEM NO. SEPARATED WITH COMMAS")
print("")
s = eval(input(" ITEMS REQUIRED :"))

LIST_ITEMS = [
[1, "GHEE ROAST MASALA", "₹", "60"],
[2, "VADA ( ALL VARIETY )", "₹", "30"],
[3, "VEG BIRIYANI", "₹", "100"],
[4, "CHEESE DOSA", "₹", "70"],
[5, "ONION DOSA", "₹", "65"],
[6, "IDLY", "₹", "45"],
[7, "CHAPPATHI", "₹", "65"],
[8, "CHICKEN 65", "₹", "100"],
[9, "GOBI 65", "₹", "70"],
[10, "PAROTTA", "₹", "60"],
[11, "SOUP (VEG,MUSHROOM)", "₹", "50"],
[12, "SAMBAR RICE", "₹", "50"]
]
ab = []
if type(s) == int:
for j in range(0, 12):
if LIST_ITEMS[j][0] == s:
ab.append(LIST_ITEMS[j])

else:
for i in s:
for j in range(0,12):
if LIST_ITEMS[j][0]==int(i):
ab.append(LIST_ITEMS[j])
print("")
sasa = input(" DO YOU WANT TO PRINT THE RECEIPT (Y/N) : ")
print("")
if sasa in "Yy":
print("")
print("------------------------------------------------------------------------")
print(" ONLINE RECEIPT")
print("")
print(" NH - 45 FOOD COURT")
print("")
print("DATE :", datetime.date.today())
print("")
print("REFERENCE NO. :", csd)

print("------------------------------------------------------------------------")

13 | P a g e
print(" S_NO. ITEM PRICE")
print("-------------------------------------------------------------------------")
c=1
count = 0
for j in range(len(ab)):
print("", c, " ", ab[j][1], " ₹", ab[j][3])
count += int(ab[j][3])
c += 1

print(" CGST/SGST "," ₹", (0.04) * count)


print("-------------------------------------------------------------------------")
print(" GRAND TOTAL"," ","₹", math.ceil(count + (0.04) * count))
print("-------------------------------------------------------------------------")
else:
print(" THANK YOU FOR CHOOSING OUR SERVICE")

with open("FOOD.dat", "ab") as f:


ab.append(csd)
pickle.dump(ab, f)
elif a == 2:
b = int(input("ENTER REFERENCE NO. :"))
with open("FOOD.dat", "rb") as f:
while True:
try:
aa = pickle.load(f)
if aa[-1] == b:
print("")
print("------------------------------------------------------------------------")
print(" ONLINE RECEIPT")
print("")
print(" NH - 45 FOOD COURT")
print("DATE :", datetime.date.today())
print("")
print("REFERENCE NO. :", b)
print("------------------------------------------------------------------------")
print(" S_NO. ITEM PRICE")
print("-------------------------------------------------------------------------")
c=1
count = 0
for j in range(len(aa) - 1):
print("", c, " ", aa[j][1], " ₹", aa[j][3])
count += int(aa[j][3])
c += 1
print(" CGST/SGST "," ₹", (0.04) * count)
print("-------------------------------------------------------------------------")
print(" GRAND TOTAL"," ","₹", math.ceil(count + (0.04) * count))

14 | P a g e
print("-------------------------------------------------------------------------")
except EOFError:
break

5. Modules of the proposed work

The code you've shared is a simple billing system for a food court. Here are the main modules
or components of the code:

15 | P a g e
1. *Menu Display Functions:*
- LUNCH(): Displays lunch menu items and prices.
- CHAT_ITEMS(): Displays chat items menu and prices.
- DINNER(): Displays dinner menu items and prices.

2. *Main Program:*
- Displays options for ordering food or viewing receipts.
- Takes user input for the choice.
- If the user chooses to order food:
- Asks for the meal type (lunch, chat items, dinner).
- Generates a reference number.
- Allows the user to select items and quantities.
- Calculates the total amount and prints an online receipt.

3. *File Handling (Pickle):*


- Stores the order details in a binary file named "FOOD.dat" using the pickle module.
- Allows users to view receipts by entering the reference number.

4. *Receipt Printing:*
- Prints an online receipt with details like date, reference number, item details, CGST/SGST,
and grand total.

5. *Random Module:*
- Utilizes the random module to generate a random reference number for each order.

6. *Datetime Module:*
- Uses the datetime module to get the current date for the receipt.

7. *Math Module:*
- Utilizes the math module for rounding up the grand total.

8. *Input Validation:*
- Validates user input for menu choices and item selection.

It's worth noting that the code could be improved by structuring it into functions, handling
exceptions more gracefully, and providing a more user-friendly interface. Additionally,
incorporating classes for items and orders could enhance the code's readability and
maintainability.

16 | P a g e
7. Results/Screenshots

17 | P a g e
8.

Conclusion
18 | P a g e
This code is executed successfully. By asking order food and view receipt ,then it display the
menu card fro that we want to choose the food to be order. Finally it asks for yes/no for
conform the order.

Also we can see the receipt by enter the reference number .

Order Food: This function likely initiates the process of ordering food. It might display a
menu card or list of available items for selection.

View Receipt: After an order is placed, there seems to be an option to view the receipt. This
functionality might require entering a reference number to retrieve the specific receipt
associated with the order.

Menu Display: When ordering, the system shows a menu card or list from which the user can
select their desired food items.

Confirmation: Once the user selects the items they want to order, the system asks for
confirmation ('yes' or 'no') to finalize the order.

Receipt Retrieval: There's a way to retrieve receipts by entering a reference number. This
might be helpful for reviewing past orders or confirming the details of a particular order.

9. References

19 | P a g e
1.Python Pocket Reference, 5th Edition

Mark Lutt

ISBN: 1449357016

O'Reilly Media, February 2014, 264 pages

2.Python in a Nutshell, 3rd Edition

AlexMartelli

ISBN: 144939292X

O'Reilly Media, May 2017, 654 pages

3. Standard Library by Example

Doug Hellman

ISBN: 9780134291055

Addison-Wesley Professional; June 11, 2017; 1456 pages

4. Python Essential Reference

David Beazley

ISBN: 0672329786

Addison-Wesley Professional; 717 pages (July, 2009)

20 | P a g e

You might also like