food automation
TRANSCRIPT
-
8/15/2019 Food Automation
1/60
1. INTRODUCTION
.
Tom's Restaurant, a restaurant in New York made familiar by Suzanne Vega and the
television sitcom Seinfeld
A restaurant is a retail establishment that serves reared food to customers Service is
generally for eating on remises, though the term has been used to describe take!out
establishments and food delivery services" The term covers many tyes of venues and a
diversity of styles of cuisine and service"
# restaurant owner is called a restaurateur $ both words derive from the %rench verb
restaurer , meaning to restore.
&FOOD AUTOMATION aims at develoing into software that can be used at laces
like restaurants and fastfood oints to easily manoeuvre the daily tasks of taking the
order, calculating the bill etc"
The main advantage of this ro(ect is that it converts all the manual work which is time
consuming and error rone to fully automated system which hels in eliminating all the
aer work, saves time, imroves customer services" )t also seeds u various rocesses
such as addition of new items to the menu, deletion of items from the menu,
*
http://en.wikipedia.org/wiki/Image:Restaurant.jpg
-
8/15/2019 Food Automation
2/60
modification of details of items and calculation of bills thus roviding convenience to
the workers as well as customers"
)n the develoment of the ro(ect , selection of an aroriate rogramming
language and a latform is of rimary imortance" The ma(or art of the credit
goes to the software environment chosen by the develoer" Selection of a language
from the ocean of languages is very difficult , a develoer has to consider various
features and functionalties that a articular language can rovide"
)n this ro(ect c++ language is used to maintain all the data" )t rovides many
features like file handling ,data can be easily maintained and many features thatare reuired while doing a ro(ect"
1.1 PROBLEM DEFINITION
The ro(ect is develoed for restaurants , which aims to automate its various tasks"
#ll the work of various tasks were earlier carried out manually" -owever in the
course of time it was realized that manual work is error rone and time
consuming" #utomation rovides uick . easy ste by ste aroach to handle the
tasks like adding items to the menu, deleting items , modifying the details of items and
calculating bills" Thus automation is no longer an otion , its a reuirement"
1.2 OBJECTIVES OF THE PROPOSED SYSTEM
• To reduce time for the organization
• To increase efficiency and accuracy of the system
• To reduce ressure on the labour and relieving man ower from reetitive and dull
(ob
/
-
8/15/2019 Food Automation
3/60
• To make the retrieval of information faster
• To make the system more feasible
• To reduce large amount of aer work
• To make the system more reliable to avoid any ambiguity"
• To reduce the cost factor of the system
• To make the system more fle0ible"
1. ADVANTA!ES OF THE PROPOSED SYSTEM
• 1onverts all the manual work which is time consuming and error rone to fully
automated system
• -els in eliminating all the aer work, saves time and imroves customer
services"
• 2akes the addition of items in the menu, deletion of items and modification of
items in the menu easier and faster"
• 1++ has suort for most of the web servers available today
• 3ills can be calculated more easily and with more accuracy
• Reduces ressure on the labour"
• 2akes the system more feasible and fle0ible and thus retrieval of information
becomes convenient"
4
-
8/15/2019 Food Automation
4/60
-
8/15/2019 Food Automation
5/60
• 2"S A6R=
2.2 FEASIBILITY STUDY
This hase is carried out to access whether software ro(ect is technically and
economically viable"
)t involves following stes7!
•
-
8/15/2019 Food Automation
6/60
• Schedule
• @egal and contractual
•
-
8/15/2019 Food Automation
7/60
. SYSTEM DESI!N
This section of the ro(ect involves the division of ro(ect in some modules or arts
thus making the resentation of the ro(ect clear and easily understandable" Ae have
discussed below various modules and art of ro(ect they contain"
.1 MODULES #Des$r%&t%'n(
This ro(ect mainly consists of two menus7
• 5=)T 25NF
• 2#)N 25NF
5dit menu consists of the following available otions7
*" #== )T52
/" =5@5T5 )T52
4" 26=)%Y )T52
:" GF)T
2#)N 25NF
H
-
8/15/2019 Food Automation
8/60
)t consists of the following otions
* GF)T
5NT5R 1-6)15
• Now here when we choose the first otion i"e"
-
8/15/2019 Food Automation
9/60
/" 26=)%Y )T52
4" =5@5T5 )T52
:" 5B)T
5NT5R 1-6)157
Now here when we choose the first otion i"e" #== )T52, we need to secify the
following details of the item7
• )T52 N#25
• )T52 16ST
• )T52
-
8/15/2019 Food Automation
10/60
.2 FLO"CHART
*>
/"see
menu*" urchase
1ancel
the
urchas
e
@ist of items
is dislayed
with its
details such
as item code,
item cost etc
5nter the
item code
and uantity
of the item to
be urchased
2ain menu with the
given available otions is
dislayed
4 5dit
menu
5dit menu
is dislayed
with certain
otions
* add
item
/ delete
item
> e0it
2odify
item
e0
5nter itemcode of the
item to be
modified andchange the
detailsaccording to
the
reuirement)tem isadded
)tem is
deleted )tem is
modified
Total
bill
Sto
3ill is
calcula
ted
ST#RT
-
8/15/2019 Food Automation
11/60
). IMPLEMENTATION OF THE PROJECT
).1 "OR*IN!
)n this ro(ect we have three classes7
• 1@#SS 25NF
• 1@#SS %66=
• 1@#SS #116FNT
)n class menu there are two main functions7
• 5dit Imenu
• 2ain Imenu
)n case of main menu we have following otions7
*
-
8/15/2019 Food Automation
12/60
> 5B)T
)n case of urchase we have to mention the item code of the item to be urchased and
uantity" Thereafter bill is dislayed" %or this we have urchase function
Ahen we choose see menu list of items along with its details such as item code, item cost
and item rice is dislayed" %or this we make use of see menu function
)n case of 5dit menu we have following otions7
#== )T52
=5@5T5 )T52
26=)%Y )T52
5B)T
)n case of add item we mention the item name, item rice and item cost for the item to be
added and thus the item is added in the menu
)n case of delete item we mention the item code of the item to be deleted "
)n case of modify item we mention the item code of the item to be modified"
%or this we make use of modifyIitem and modifyIrecord functions"
Ahen we choose total bill ,total bill is dislayed"
)n class food we have following functions7
*/
-
8/15/2019 Food Automation
13/60
#ddIitem! This function add records in the food file"
=eleteIitem J This function gives the code no" to delete record from the food file
2odifyIitem JThis function gives the code no" to modify record from the food file
@istIofIitem! This function dislays the list of food items
-
8/15/2019 Food Automation
14/60
).2 SOURCE CODE
Mincludeiostream"hO Mincludegrahics"hO
Mincludefstream"hO
Mincluderocess"hO
Mincludestring"hO
Mincludestdlib"hO
Mincludestdio"hO
Mincludectye"hO
Mincludeconio"hO
Mincludedos"hO
class menu
P
ublic7
void mainImenuKL$
rivate7
void editImenuKvoidL$
Q$
*:
-
8/15/2019 Food Automation
15/60
class food
P
ublic7
void addIitemKvoidL$
void deleteIitemKvoidL$
void modifyIitemKvoidL$
void listIofIitemKvoidL$
void urchaseKvoidL$
rivate7
int lastIcodeKvoidL$
void deleteIrecordKintL$
void modifyIrecordKintL$
void dislayIrecordKintL$
int itemIfoundKintL$
int recordnoKintL$
void sortKvoidL$
int itemcode$
char itemname4>$
float itemcost,itemrice$
Q$
class account
P
ublic7
void billIlistKvoidL$
void reareIbillKintL$
int lastIbillnoKvoidL$
*D
-
8/15/2019 Food Automation
16/60
void addIbillKint,int tIitemcode,char tIitemname,float tIty,float tIcost,float
tIriceL$
rivate7
int code,billno,length$
int dd,mm,yy$
float cost, rice,uantity$
char name4>$
Q$
CCT-)S %FN1T)6N 1R5#T5S 2#)N 25NF #N= 1#@@S 6T-5R %FN1T)6NS
void menu77mainImenuKvoidL
P
clrscrKL$
char ch$
whileK*L
P
clrscrKL$
goto0yK//,DL$
coutU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!U$
goto0yK4D,EL$
coutU%#ST %66=U$
goto0yK//,HL$
coutU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!U$
goto0yK4/,8L$
coutU*7
-
8/15/2019 Food Automation
17/60
goto0yK4/,*HL$
coutU>7 GuitU$
goto0yK4/,/>L$
coutUenter choice7U$
chgetcheKL$
ifKch/HL
return$
else
ifKch'*'L
P
food f$
f"urchaseKL$
Q
else
ifKch'/'L
P
food f$
f"listIofIitemKL$
Q
else
ifKch'4'L
editImenuKL$
else
ifKch':'L
P
account a$
a"billIlistKL$
Q
else
*H
-
8/15/2019 Food Automation
18/60
ifKch'>'L
break$
Q
Q
CCT-)S %FN1T)6N 1R5#T5 5=)T 25NF #N= 1#@@S 6T-5R
CC%FN1T)6NS
void menu77editImenuKL
P
clrscrKL$
char ch$
whileK*L
P
forKint iD$i/*$i++L
P
goto0yK/*,iL$
coutU U$
Q
goto0yK4/,EL$
coutUedit menuU$
goto0yK4/,HL$
coutUWWWWWWWWWWWWWWWWWWWWWU$
goto0yK4/,*>L$
coutU*7add itemU$
goto0yK4/,*/L$
coutU/7modify itemU$
goto0yK4/,*:L$
coutU47delete itemU$
goto0yK4/,*EL$
*9
-
8/15/2019 Food Automation
19/60
coutU>7e0itU$
goto0yK4/,*8L$
coutUenter choice7U$
chgetcheKL$
ifKch/HL
return$
else
ifKch'*'L
P
food f$
f"addIitemKL$
break$
Q
else
ifKch'/'L
P
food f$
f"modifyIitemKL$
break$
Q
else
ifKch'4'L
P
food f$
f"deleteIitemKL$
break$
Q
else
ifKch'>'L
break$
Q
*8
-
8/15/2019 Food Automation
20/60
Q
CCT-)S %FN1T)6N R5TFRNS T-5 16=5 6% T-5 @#ST R516R= )N
CCT-5 %66= %)@5 K%66="=#TL
int food77lastIcodeKvoidL
P
fstream file$
file"oenKU%66="=#TU,ios77inL$
file"seekgK>,ios77begL$
int t>$
whileKfile"readKKcharLthis,sizeofKfoodLLL
titemcode$
file"closeKL$
return t$
Q
CCT-)S %FN1T)6N =)S
-
8/15/2019 Food Automation
21/60
goto0yK/,DL$
coutUWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXU$
whileKfile"readKKcharLthis,sizeofKfoodLLL
P
delayK/>L$
found*$
goto0yKD,rowL$
coutitemcode$
goto0yK*:,rowL$
coutitemname$
goto0yK4/,rowL$
coutitemcost$
goto0yK:D,rowL$
coutitemrice$
ifKrow//L
P
rowD$
goto0yKEE,*L$
coutU
-
8/15/2019 Food Automation
22/60
coutUWWWWWWWWWWWWWWWWWWWWWWWWWWWU$
Q
else
row++$
Q
ifKfoundL
P
goto0yKD,*>L$
coutUZHRecords not foundU$
Q
goto0yKEE,*L$
coutUage no7Uageno$
goto0yKEE,/L$
coutUU$
goto0yK*,/DL$
coutU
-
8/15/2019 Food Automation
23/60
coutU>O5B)TU$
goto0yK/H,4L$
coutU#== %66= )T52 T6 T-5 25NFU$
goto0yK/E,:L$
coutUWWWWWWWWWWWWWWWWWWWWWWWWWU$
goto0yKD,EL$
coutU)temcode7Utcode$
goto0yKD,9L$
coutU)tem name7U$
goto0yKD,*>L$
coutU)tem cost7U$
goto0yKD,*/L$
coutU)tem rice7U$
do
P
valid*$
goto0yK*,9L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 N#25 T6 #== )N T-5 25NFU$
goto0yKD,9L$
coutU)tem Name7U$
getsKitemnameL$
strurKitemnameL$
ifKitemname>'>'L
return$
ifKKstrlenKitemnameL*L[[KstrlenKitemnameLO/>LL
P
valid>$
goto0yK4,/:L$
/4
-
8/15/2019 Food Automation
24/60
coutUZHrange*"/>U$
getchKL$
Q
QwhileKvalidL$
do
P
valid*$
goto0yK*,*>L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 16ST T6 #== )N T-5 25NFU$
goto0yKD,*>L$
coutU)tem cost7U$
getsKtIitemcostL$
itemcostatofKtIitemcostL$
ifKtIitemcost>'>'L
return$
ifKitemcost*[[itemcostO9>>L
P
valid>$
goto0yK4,/:L$
coutUZHRange*"9>>U$
getchKL$
Q
QwhileKvalidL$
do
P
valid*$
goto0yK*,*/L$clreolKL$
goto0yK*,/:L$clreolKL$
/:
-
8/15/2019 Food Automation
25/60
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 '>'L
return$
ifKitemriceitemcost[[itemriceO*>>>L
P
valid>$
goto0yK4,/:L$
coutUZHRangeUitemcostU"""*>>>U$
getchKL$
Q
QwhileKvalidL$
do
P
goto0yK*,*DL$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yKD,*DL$
coutUdo you want to save this recordKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
QwhileKch'N'..ch'Y'L$
ifKch'Y'L
P
/D
-
8/15/2019 Food Automation
26/60
itemcodetcode$
fstream file$
file"oenKU%66="=#TU,ios77out[ios77aL$
file"writeKKcharLthis,sizeofKfoodLL$
file"closeKL$
tcode++$
Q
do
P
goto0yK*,*HL$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yKD,*HL$
coutU=6 Y6F A#NT T6 #== 26R5 R516R=SKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
QwhileKch'N'..ch'Y'L$
QwhileKch'Y'L$
Q
CCT-)S %FN1T)6N =)S,ios77begL$
/E
-
8/15/2019 Food Automation
27/60
whileKfile"readKKcharLthis,sizeofKfoodLLL
P
ifKitemcodetcodeL
P
goto0yKD,4L$
coutU)tem 1ode7Uitemcode$
goto0yKD,:L$
coutU)tem Name7Uitemname$
goto0yKD,DL$
coutU)tem 1ost7Uitemcost$
goto0yKD,EL$
coutU)tem
-
8/15/2019 Food Automation
28/60
found++$
break$
Q
Q
file"closeKL$
return found$
Q
CCT-)S %FN1T)6N R5TFRN T-5 R516R= N6"6% T-5 ?)V5N 16=5
)N CCT-5 %66= %)@5 K%66="=#TL
int food77recordnoKint tcodeL
P
fstream file$
file"oenKU%66="=#TU,ios77inL$
file"seekgK>,ios77begL$
int found>$
whileKfile"readKKcharLthis,sizeofKfoodLLL
P
found++$
ifKitemcodetcodeL
break$
Q
file"closeKL$
return found$
Q
CCT-)S %FN1T)6N =5@5T5S T-5 R516R= %6R T-5 ?)V5N 16=5 %R62
CCT-5 %66= %)@5 K %66="=#TL
void food77deleteIrecordKint tcodeL
/9
-
8/15/2019 Food Automation
29/60
P
fstream file$
file"oen KU%66="=#TU,ios77inL$
fstream tem$
tem"oenKUtem"datU,ios77outL$
file"seekgK>,ios77begL$
whileKfile"eofKLL
P
file"readKKcharLthis,sizeofKfoodLL$
ifKfile"eofKLL
break$
ifKitemcodetcodeL
tem"writeKKcharLthis,sizeofKfoodLL$
Q
file"closeKL$
tem"closeKL$
file"oenKU%66="=#TU,ios77outL$
tem"oenKUtem"datU,ios77inL$
tem"seekgK>,ios77begL$
whileKtem"eofKLL
P
tem"readKKcharLthis,sizeofKfoodLL$
ifKtem"eofKLL
break$
file"writeKKcharLthis,sizeofKfoodLL$
Q
file"closeKL$
tem"closeKL$
/8
-
8/15/2019 Food Automation
30/60
Q
CCT-)S %FN1T)6N ?)V5S T-5 16=5 N6" T6 =5@5T5 T-5 R516R=
CC%R62 T-5 %66= %)@5 K%66="=#TL
void food77deleteIitemKL
P
clrscrKL$
char tIcodeD,ch$
int t,tcode$
goto0yK4,/DL$
coutU'>'L
return$
ifKtcode>L
P
listIofIitemKL$
goto0yK*,/DL$
clreolKL$
goto0yK4,/DL$
coutU
-
8/15/2019 Food Automation
31/60
tcodet$
ifKtcode>L
return$
Q
clrscrKL$
ifKitemIfoundKtcodeLL
P
goto0yKD,DL$
coutUZHrecord not foundU$
getchKL$
return$
Q
dislayIrecordKtcodeL$
do
P
goto0yK*,9L$
clreolKL$
goto0yKD,9L$
coutU=o you want to delete this record KyCnL7U$
chgetcheKL$
chtouerKchL$
Q
whileKch'N'..ch'Y'L$
ifKch'N'L
return$
deleteIrecordKtcodeL$
goto0yKD,*DL$
coutUZHRecord =eletedU$
getchKL$
Q
4*
-
8/15/2019 Food Automation
32/60
CCT-)S %FN1T)6N 26=)%Y T-5 R516R= %6R T-5 ?)V5N 16=5
%R62 CCT-5 %66= %)@5 K%66="=#TL
void food77modifyIrecordKint tcodeL
P
int recno$
recnorecordnoKtcodeL$
int valid,tIcode$
char ch,tIitemcost*>,tIitemrice*>,tIitemcodeD$
goto0yKH*,/L$
coutU>O50itU$
goto0yKD,*/L$
coutU)tem 1ode7U$
goto0yKD,*:L$
coutU)tem Name7U$
goto0yKD,*EL$
coutU)tem 1ost7U$
goto0yKD,*9L$
coutU)tem ,*/L$clreolKL$
coutU1hangeKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
Q
whileKch'N'..ch'Y'L$
4/
-
8/15/2019 Food Automation
33/60
valid>$
whileKch'Y'..validL
P
valid*$
goto0yK*,*/L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 16=5 T6 #== )N T-5 25NFU$
goto0yKD,*/L$
coutU)tem 1odeU$
getsKtIitemcodeL$
tIcodeatoiKtIitemcodeL$
ifKtIcode>L
return$
ifKitemIfoundKtIcodeL..KtIcodetcodeLL
P
valid>$
goto0yK4,/:L$
coutUZH16=5 #@R5#=Y ?)V5NU$
getchKL$
Q
Q
do
P
goto0yK/>,*:L$
clreolKL$
coutU1hangeKyCnL7U$
chgetcheKL$
44
-
8/15/2019 Food Automation
34/60
chtouerKchL$
ifKch'>'L
return$
Q
whileKch'N'..ch'Y'L$
valid>$
whileKch'Y'..validL
P
valid*$
goto0yK*,*:L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 N#25 T6 #== )N T-5 25NF7U$
goto0yKD,*:L$
coutU)tem Name7U$
getsKitemnameL$
strurKitemnameL$
ifKitemname>'>'L
return$
ifKKstrlenKitemnameL*L[[KstrlenKitemnameLO/>LL
P
valid>$
goto0yK4,/:L$
coutUZHRange*"/>U$
getchKL$
Q
Q
do
P
goto0yK/>,*EL$
4:
-
8/15/2019 Food Automation
35/60
clreolKL$
coutUchangeKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
Q
whileKch'N'..ch'Y'L$
valid>$
whileKch'N'..validL
P
valid*$
goto0yK*,*EL$
clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 16ST T6 #== )N T-5 25NFU$
goto0yKD,*EL$
coutU)tem 1ost7U$
getsKtIitemcostL$
itemcostatofKtIitemcostL$
ifKtIitemcost>'>'L
return$
ifKitemcost*[[itemcostO9>>L
P
valid>$
goto0yK4,/:L$
coutUZHRange*"9>>U$
getchKL$
4D
-
8/15/2019 Food Automation
36/60
Q
Q
do
P
goto0yK/>,*9L$
clreolKL$
coutUchangeKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
Q
whileKch'N'..ch'Y'L$valid>$
whileKch'Y'..validL
P
valid*$
goto0yK*,*9L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R )T52 >>L
P
valid>$
goto0yK4,/:L$
4E
-
8/15/2019 Food Automation
37/60
coutUZHRangeUitemcostU""""*>>>U$
getchKL$
Q
Q
do
P
goto0yK*,/*L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yKD,/*L$
coutU=o you want to save this recordKyCnL7U$
chgetcheKL$
chtouerKchL$
ifKch'>'L
return$
QwhileKch'N'..ch'Y'L$
ifKch'N'..ch'Y'L$
ifKch'N'L
return$
itemcodetIcode$
getchKL$
fstream file$
file"oenKU%66="=#TU,ios77out[ios77ateL$
int location$
locationKrecno!*LsizeofKfoodL$
file"seekKlocationL$
file"writeKKcharLthis,sizeofKfoodLL$
file"closeKL$
sortKL$clrscrKL$
goto0yKD,*DL$
coutUZHRecord 2odifiedU$
4H
-
8/15/2019 Food Automation
38/60
getchKL$
Q
CCT-)S %FN1T)6N ?)V5S T-5 16=5 N6" T6 26=)%Y R516R= %R62
CCT-5 %66= %)@5 K%66="=#TL
void food77modifyIitemKL
P
clrscrKL$
char tIcodeD,ch$
int t,tcode$
goto0yK4,/DL$
coutU'>'L
return$
ifKtcode>L
P
listIofIitemKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU
-
8/15/2019 Food Automation
39/60
tatoiKtIcodeL$
tcodet$
ifKtcode>L
return$
Q
clrscrKL$
ifKitemIfoundKtcodeLL
P
goto0yKD,DL$
coutUZHRecord not foundU$
getchKL$
return$
Q
dislayIrecordKtcodeL$
do
P
goto0yK*,9L$clreolKL$
goto0yKD,9L$
coutU=o you want to 2odify this recordKyCnL7U$
chgetcheKL$
chtouerKchL$
QwhileKch'N'..ch'Y'L$
ifKch'N'L
return$
modifyIrecordKtcodeL$
Q
CCT-)S %FN1T)6N S6RT T-5 R516R= )N T-5 %66= %)@5
K%66="=#TL CC#116R=)N? T6 T-5 16=5 N6S"
48
-
8/15/2019 Food Automation
40/60
void food77sortKL
P
int i>,(> $
food arr*>>$
food tem$
fstream file$
file"oenKU%66="=#TU,ios77inL$
file"seekgK>,ios77begL$
whileKfile"readKKcharL.arri,sizeofKfoodLLL
i++$
int size$
sizei$
file"closeKL$
forKi*$isize$i++L
forK(>$(size!i$(++L
P
ifKarr("itemcodeOarr(+*"itemcodeL
P
temarr($
arr(arr(+*$
arr(+*tem$
Q
Q
file"oenKU%66="=#TU,ios77outL$
forKi>$isize$i++L
file"writeKKcharL.arri,sizeofKfoodLL$
file"closeKL$
Q
CCT-)S %FN1T)6N
-
8/15/2019 Food Automation
41/60
P
clrscrKL$
account a$
int tIbillno,urchased>$
tIbillnoa"lastIbillnoKL$
tIbillno++$
char tIcodeD,ch,tIuantityD$
int t,tcode,i>,valid$
float ty$
int tIitemcode$
float tIty,tIcost,tIrice$
char tIitemname4>$
struct date d$
int d*,m*,y*$
getdateK.dL$
d*d"daIday$
m*d"daImon$
y*d"daIyear$
do
P
clrscrKL$
goto0yK4,/DL$
coutU'>'L
P
ifKurchasedL
:*
-
8/15/2019 Food Automation
42/60
-
8/15/2019 Food Automation
43/60
dislayIrecordKtcodeL$
do
P
valid*$
goto0yK*,9L$clreolKL$
goto0yK*,/:L$clreolKL$
goto0yK*,/DL$clreolKL$
goto0yK4,/DL$
coutU5NT5R GF#NT)TY T6 35 '>'L
P
ifKurchasedL
a"reareIbillKtIbillnoL$
return$
Q
ifKty*[[tyO9>>L
P
valid>$
goto0yK4,/:L$
coutUZHRange*""9>>U$
getchKL$
Q
QwhileKvalidL$
do
P
goto0yKD,*>L$clreolKL$
goto0yKD,*>L$
:4
-
8/15/2019 Food Automation
44/60
coutU=o You want to cancel this urchaseKyCnL7U$
chgetcheKL$
chtouerKchL$
Q
whileKch'N'..ch'Y'L$
ifKch'N'L
P
urchased*$
fstream file$
file"oenKU%66d"=#TU,ios77inL$
file"seekgK>,ios77begL$
whileKfile"readKKcharLthis,sizeofKfoodLLL
P
ifKitemcodetcodeL
P
tIitemcodeitemcode$
strcyKtIitemname,itemnameL$
tIcostitemcost$
tIriceitemrice$
tItyty$
a"addIbillKtIbillno,tIitemcode,tIitemname,tIty,tIcost,tIriceL$
i++$
break$
Q
Q
file"closeKL$
Q
do
P
::
-
8/15/2019 Food Automation
45/60
goto0yKD,*/L$
clreolKL$
goto0yKD,*/L$
coutU=o you want to urchase more KyCnL7U$
chgetcheKL$
chtouerKchL$
Q
whileKch'N'..ch'Y'L$
Q
whileKch'Y'L$
a"reareIbillKtIbillnoL$
Q
CCT-)S %FN1T)6N R5TFRNS T-5 3)@@ N6" 6% T-5 @#ST R516R= )N
CCT-5 3)@@ %)@5K3)@@"=#TL
int account77lastIbillnoKL
P
fstream file$
file"oenKU3)@@"=#TU,ios77inL$
file"seekgK>,ios77begL$
int t>$
whileKfile"readKKcharLthis,sizeofKaccountLLL
tbillno$
file"closeKL$
return t$
Q
CCT-)S %FN1T)6N #==S T-5 R516R= )N T-5 3)@@ %)@5 K3)@@"=#TL
:D
-
8/15/2019 Food Automation
46/60
void account77addIbillKint tIbillno,int tIitemcode,char tIitemname4>,float
tIty,float tIcost,float tIriceL
P
struct date d$
int d*,m*,y*$
getdateK.dL$
d*d"daIday$
m*d"daImon$
y*d"daIyear$
ddd*$
mmm*$
yyy*$
codetIitemcode$
strcyKname,tIitemnameL$
costtIcost$
ricetIrice$
uantitytIty$
billnotIbillno$
fstream file$
file"oenKU3)@@"=#TU,ios77out[ios77aL$
file"writeKKcharLthis,sizeofKaccountLL$
file"closeKL$
Q
CCT-)S %FN1T)6N
-
8/15/2019 Food Automation
47/60
int d*,m*,y*$
getdateK.dL$
d*d"daIday$
m*d"daImon$
y*d"daIyear$
int total,totalIbill>$
goto0yK44,4L$
coutU1FST625R 3)@@U$
goto0yK4/,:L$
coutUWWWWWWWWWWWWWWWWWWWWWWWWWWWWWU$
goto0yKDD,DL$
coutU=ate7Ud*UCUm*UCUy*$
goto0yK9,HL$
coutU)T52S L$
coutUWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXU$
int row**$
fstream file$
file"oenKU3)@@"=#TU,ios77inL$
file"seekgK>L$
whileKfile"readKKcharLthis,sizeofKaccountLLL
P
ifKbillnotIbillnoL
P
goto0yK9,DL$
coutU3)@@ N6 MUbillno$
:H
-
8/15/2019 Food Automation
48/60
-
8/15/2019 Food Automation
49/60
-
8/15/2019 Food Automation
50/60
row++$
Q
goto0yK:,rowL$
coutbillno$
Q
flag*$
goto0yK**,rowL$
coutddUCUmmUCUyy$
goto0yK/:,rowL$
coutcode$
goto0yK4/,rowL$
coutname$
goto0yK:/,rowL$
coutcost$
goto0yKD/,rowL$
coutrice$
goto0yKE*,rowL$
revIbillnobillno$
Q
row++$
goto0yKH*,rowL$
float totalI/>">$
totalI/totalI/+totalIbill$
row++$
coutUT6T#@ 3)@@7Rs"UtotalI/UCU$
ifKfoundL
P
goto0yKD,*>L$
coutUZHRecords not foundU$
D>
-
8/15/2019 Food Automation
51/60
Q
goto0yKEE,*L$
coutU,/:>,>,4E>,4>>,*D>L$
sette0tstyleK*>,>,4L$
sette0t(ustifyK*,*L$
setcolorKDL$
outte0t0yK4/>,*H>,U%#ST%66= #FT62#T)6NUL$
delayK/D>L$
sette0tstyleK:,>,:L$
setcolorK/>L$
outte0t0yK4/>,//>,U2#=5 3YUL$
delayK/D>L$
outte0t0yK4/>,4*D,UUL$
sette0tstyleK*>,>,*L$
setcolorK4L$
delayK/D>L$
outte0t0yK4/>,/ED,US-#S-A#TUL$
forKint stangle>$kbhitKL$stangle++L
D*
-
8/15/2019 Food Automation
52/60
P
setcolorKHL$
elliseK4/>,/:>,stangle,stangle+/>,4>>,*D>L$
elliseK4/>,/:>,stangle+*9>,stangle+/>>,4>>,*D>L$
delayK8L$
setcolorK9L$
elliseK4/>,/:>,stangle!*,stangle+*8,4>>,*D>L$
elliseK4/>,/:>,stangle!*+*9>,stangle+*88,4>>,*D>L$
Q
closegrahKL$
Q
CCT-)S %FN1T)6N )S T-5 2#)N %FN1T)6N 1#@@)N? T-5 2#)N
CC25NF
void mainKL
P
clrscrKL$
graKL$
menu m$
m"mainImenuKL$
Q
D/
-
8/15/2019 Food Automation
53/60
+. OUTPUT
6utut obtained by choosing the first otion i"e"
-
8/15/2019 Food Automation
54/60
#fter entering the item code of the item to be urchased
D:
-
8/15/2019 Food Automation
55/60
1alculated bill is then dislayed as shown below7
6utut obtained by choosing the second otion see menu
DD
-
8/15/2019 Food Automation
56/60
6ututs obtained by choosing the third otion edit menu
#fter choosing add item we get following7
DE
-
8/15/2019 Food Automation
57/60
6utut obtained by choosing modify item
6utut obtained after entering the code
DH
-
8/15/2019 Food Automation
58/60
,. CONCLUSION
#s we all know that a restaurant is a retail establishment that serves reared food to
customers" Service is generally for eating on remises, though the term has been used to
describe take!out establishments and food delivery services" So this ro(ect basically
develos a software that can be used at such laces to easily manoeuvre the daily tasks of
taking the order, calculating the bill, modifying the details of the items in the menu etc"
• This ro(ect is time saving as it saves the time of the workers as well as
customers" )t calculates bill uickly and correctly" 2odification of the details of
the items in the menu, addition of more items in the menu, deletion of items and
keeing u of the track of the items urchased is much more convenient"
D9
-
8/15/2019 Food Automation
59/60
• )t is also storage saving "
-
8/15/2019 Food Automation
60/60