Beruflich Dokumente
Kultur Dokumente
PROJECT
FOOD ORDERING SYSTEM
DONE BY :
AKASH A
CLASS 12
AKASH.A
GRADE 12 - A2
SUGUNA PIP SCHOOL
1
SUGUNA PIP SCHOOL, COIMBATORE
CERTIFICATE
......................AKASH A..................................
2
ACKNOWLEDGEMENT
3
ABSTRACT
INTRODUCTION
4
This is a project made by using a perfect fusion of
polymorphism, inheritance and file handling concepts to create
an application which lets a user to login and order food for
which a bill is generated displaying the total amount for the
order and the cashier of the order after which a rider is assigned
to deliver the above said order to the user and the time it would
take for the delivery.
WORKING PRINCIPLE
5
First a user login interface was created using basic character
match concept and then a list of delicacies on the menu is
displayed with a number tagged to each. Ordering is done by
entering the number tagged to the desired order when prompted
to and update the order if required or add any other order
similarly, if required. Else the page clears to display the bill for
the order using file concept where the total amount of the bill
and the cashier’s name is displayed.
Then the screen clears again to show the rider assigned to the
order, which is done using random number generation method ,
and thanks the user for using the app.
SOURCE CODE
#include<iostream>
#include<string.h>
6
#include<stdlib.h>
#include<conio.h>
#include<fstream>
#include<windows.h>
#include<time.h>
class one
public:
void menu1();
};
void one::menu1()
cout<<"\n\n\n\t===========================\t\t\t====================
======\t\t\t\t==========================="<<endl;
7
cout<<"\n\t===============================================================
========================================================================"<
<endl;
protected:
int pizza,ch,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s=0;
string y,ye;
public:
void menu2()
{ ofstream write;
write.open("order.text");
if(!write)
exit (-1);
a:
b:
c:
cin>>ch;
8
cin>>ye;
if(ye=="y"|| ye=="Y")
goto b;
else
switch(ch)
case 1:
cin>>pizza;
a=480;
s=s+a*pizza;
write<<" \n";
write<<"\n";
break;
case 2:
cin>>pizza;
9
b=440;
s=s+b*pizza;
write<<" \n";
write<<"\n";
break;
case 3:
cin>>pizza;
c=580;
s=s+c*pizza;
write<<" \n";
write<<"\n";
break;
case 4:
cin>>pizza;
10
d=520;
s=s+d*pizza;
write<<" \n";
write<<"\n";
break;
case 5:
cin>>pizza;
e=350;
s=s+e*pizza;
write<<" \n";
write<<"\n";
break;
case 6:
cin>>pizza;
11
f=400;
s=s+f*pizza;
write<<"\n ";
write<<"\n";
break;
case 7:
cin>>pizza;
g=420;
s=s+g*pizza;
write<<"\n ";
write<<"\n";
break;
case 8:
cin>>pizza;
12
h=540;
s=s+h*pizza;
write<<" \n";
write<<"\n";
break;
case 9:
cin>>pizza;
i=548;
s=s+i*pizza;
write<<" \n";
write<<"\n";
break;
case 10:
cin>>pizza;
13
j=390;
s=s+j*pizza;
write<<" \n";
write<<"\n";
break;
case 11:
cin>>pizza;
k=525;
s=s+k*pizza;
write<<" \n";
write<<"\n";
break;
case 12:
cin>>pizza;
14
l=425;
s=s+l*pizza;
write<<" \n";
write<<"\n";
break;
case 13:
cin>>pizza;
m=335;
s=s+m*pizza;
write<<" \n";
write<<"\n";
break;
case 14:
cin>>pizza;
15
n=324;
s=s+n*pizza;
write<<" \n";
write<<"\n";
break;
case 15:
cin>>pizza;
o=360;
s=s+o*pizza;
write<<"\n ";
write<<"\n";
break;
case 16:
exit(0);
break;
16
default:
goto c;
break;
cin>>y;
if(y=="yes"|| y=="YES")
goto a;
else
for(int a=1;a<8;a++)
Sleep(500);
cout<<"\n\t\t\t\t\t\t\t";
system("PAUSE");
system("cls");
cout <<
"\n\t\t\t\t\t\t\t ================================================"<<endl;
17
cout <<
"\t\t\t\t\t\t\t| Foodie's Stop |"<<endl;
cout <<
"\t\t\t\t\t\t\t ================================================"<<endl;
cout <<
"\t\t\t\t\t\t\t Bill No : CP51 Order : NB1353"<<endl;
cout <<
"\t\t\t\t\t\t\t Cashier : Harry"<<endl;
write<<"\t\t\t\t\t\t\t ";
cout <<
"\n\t\t\t\t\t\t\t ================================================"<<endl;
system("PAUSE");
assignrider();
write.close();
void show1()
menu1();
menu2();
18
};
public:
void assignrider();
void total()
long userId;
d:
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t--------------
-------";
cin>>userId;
cout<<"\t\t\t\t\t\t\t---------------------";
if(userId!=1353)
cout<<"\nDon't try to be
smart.....Enter correct id\n";
goto d;
else
cout<<"\n\n\n\t\t\t\t\t\t\tHello Customer3687,\n";
z:
string pwd="pass";
string pass="";
char c;
19
cout<<"\n\n\n\t\t\t\t\t\t\tPassword =
";
p:
c=getch();
cout<<"*";
if(c!=13)
pass=pass+c;
goto p;
if(pass==pwd)
cout<<"\n\n\t\t\t\t\t\t\tAccess
Granted. Welcome to our system\n\n\n";
system("PAUSE");
system("CLS");
show1();
else
cout<<"\nWrong Password\n";
goto z;
};
20
int main()
system("mode 650");
three ob;
ob.total();
getch();
void assignrider()
system("cls");
statusrider2 = 'u',
statusrider3 = 'u',
statusrider4 = 'u',
statusrider5 = 'u',
statusrider6 = 'u',
statusrider7 = 'u',
statusrider8 = 'u';
x:
time_t t;
seedval = (unsigned)time(&t);
srand(seedval);
int s = (rand()%7);
switch (s)
21
cout << "Rider 1 has been assigned to you.\nPlease wait for 30
minutes and the food will be at your doorsteps.\nThank you for trying
Foodie's Stop.Come again later.";
break;
break;
break;
break;
break;
break;
break;
22
case 7:statusrider8 = 'o';
break;
OUTPUT
23
24
25
26
27
28
29
30
31
CONCLUSION
This project explains the working and general principle of any
food ordering app .It is an improved version of this program that
is found in the modern day food ordering systems .The main
aspects used in this program are POLYMORPHISM,
INHERITANCE AND DATA FILE HANDLING.
BIBLIOGRAPHY
32
BOOK REFERENCES:
WEB REFERENCES:
33
THANK
YOU.
34