Professional Documents
Culture Documents
Project:-MASTER CHEF RESTRO....
Project:-MASTER CHEF RESTRO....
Project:-MASTER CHEF RESTRO....
#include<graphics.h>
#include<iostream.h>
#include<fstream.h>
#include<process.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<ctype.h>
#include<conio.h>
#include<dos.h>
int tol;
int mrec=0;
float v=0;
int count=0;
fstream ft("res.dat",ios::binary||ios::out||ios::in||ios::app);
class res
{ public:
int m;
int s;
}e;
void main_menu();
void end();
void password();
float order();
void bill();
void feedback();
void menu();
void food();
void italian();
void indian();
void chinese();
void conti();
void desert();
void drinks();
/************************************
MAIN FUNCTION
*************************************/
void main()
password();
main_menu();
menu();
end();
getch();
}
/*****************************************
******************************************/
void password()
{ char pass[]={'p','h','y','s','i','\0'};
clrscr();
char password[5];
int value;
p:
clrscr();
gotoxy(25,12);
int i,l,len,len1;
for(i=0;i<5;i++)
password[i]=getch();
cout<<"*";
password[5]='\0';
value=strcmp(pass,password);
getch();
if(value!=0)
gotoxy(24,15);
cout<<"INVALID PASSWORD";
delay(500);
goto p;
}
//*********************************
WELCOME SCREEN
**************************************
void main_menu()
{ clrscr();
gotoxy(63,1);
int i;
gotoxy(34,10);
for(i=0;a[i]!='\0';i++)
cout<<a[i];
delay(100);
gotoxy(39,12);
for(i=0;b[i]!='\0';i++)
cout<<b[i];
delay(100);
gotoxy(32,14);
for(i=0;c[i]!='\0';i++)
cout<<c[i];
delay(100);
gotoxy(20,20);
for(i=0;d[i]!='\0';i++)
cout<<d[i];
delay(100);
}
delay(1000);
/************************************
EXIT SCREEN
**************************************/
void end()
clrscr();
gotoxy(20,6);
cout<<a;
gotoxy(20,8);
gotoxy(40,12);
gotoxy(20,18);
delay(3000);
}
//
**********************************************
*****************************
void menu()
clrscr();
int ch;
clrscr();
gotoxy(32,6);
cout<<"MAIN MENU";
gotoxy(30,7);
cout<<"*************";
gotoxy(25,10);
cout<<"1.MENU DISPLAY";
gotoxy(25,11);
cout<<"2.ORDER";
gotoxy(25,12);
cout<<"3.BILL";
gotoxy(25,13);
cout<<"4.RECORDS";
gotoxy(25,14);
cout<<"5.FEEDBACK";
gotoxy(25,15);
cout<<"6.EXIT";
d:
gotoxy(55,20);
cin>>ch;
if((ch<=6)&&(ch>=1))
switch(ch)
case 1:
food();
break;
case 2:
order();
break;
case 3:
bill();
break;
case 4:
clrscr();
if(count==0)
for(int i=1;i<=count;i++)
ft.seekg(0);
ft.read((char *)&e,sizeof(e));
gotoxy(15,6);
cout<<"\nRECORD #"<<i;
cout<<"\tITEMS= "<<e.s;
cout<<"\tTOTAL= "<<e.m;
getch();
ft.close();
menu();
break;
case 5:
feedback();
break;
case 6:
end();
exit(0);
break;
else
goto d;
}
//
**********************************************
*****************************
void food()
clrscr();
int ch;
gotoxy(33,6);
cout<<"MENU";
gotoxy(30,7);
cout<<"**********";
gotoxy(25,10);
cout<<"1.ITALIAN FOOD";
gotoxy(25,11);
cout<<"2.INDIAN FOOD";
gotoxy(25,12);
cout<<"3.CHINESE FOOD";
gotoxy(25,13);
cout<<"4.CONTINENTAL";
gotoxy(25,14);
cout<<"5.DESERT";
gotoxy(25,15);
cout<<"6.DRINKS";
gotoxy(25,16);
gotoxy(55,20);
cin>>ch;
switch(ch)
case 1:
italian();
break;
case 2:
indian();
break;
case 3:
chinese();
break;
case 4:
conti();
break;
case 5:
desert();
break;
case 6:
drinks();
break;
ft.close();
menu();
//
**********************************************
***************************
void italian()
clrscr();
gotoxy(35,5);
cout<<"Italian food";
gotoxy(15,6);
cout<<"***************************************************"
;
gotoxy(15,8);
gotoxy(15,9);
gotoxy(15,10);
gotoxy(15,11);
gotoxy(15,12);
gotoxy(15,13);
gotoxy(15,14);
gotoxy(55,22);
ft.close();
food();
//
**********************************************
*******************************
void indian()
clrscr();
gotoxy(35,5);
cout<<"Indian food";
gotoxy(15,6);
cout<<"***************************************************"
;
gotoxy(15,8);
gotoxy(15,9);
gotoxy(15,10);
cout<<"9.MAKHNI DAL ........... 150.00";
gotoxy(15,11);
gotoxy(15,12);
gotoxy(15,13);
gotoxy(15,14);
gotoxy(55,22);
getch();
ft.close();
food();
//
**********************************************
*******************************
void chinese()
{
clrscr();
gotoxy(35,5);
cout<<"CHINESE FOOD";
gotoxy(15,6);
cout<<"***************************************************"
;
gotoxy(15,8);
gotoxy(15,9);
gotoxy(15,10);
gotoxy(15,11);
gotoxy(15,12);
gotoxy(15,13);
gotoxy(15,14);
getch();
ft.close();
food();
//
**********************************************
*****************************
void conti()
clrscr();
gotoxy(35,5);
cout<<"CONTINENTAL FOOD";
gotoxy(15,6);
cout<<"***************************************************"
;
gotoxy(15,8);
gotoxy(15,9);
cout<<"20.LONWABO .......... 200.00";
gotoxy(15,10);
gotoxy(15,11);
gotoxy(15,12);
gotoxy(15,13);
gotoxy(15,14);
gotoxy(55,22);
getch();
ft.close();
food();
//
**********************************************
*****************************
void desert()
clrscr();
gotoxy(35,4);
cout<<"DESERT";
gotoxy(15,5);
cout<<"***************************************************"
;
gotoxy(15,7);
gotoxy(15,8);
gotoxy(15,9);
gotoxy(15,10);
gotoxy(15,11);
gotoxy(15,12);
gotoxy(55,22);
getch();
ft.close();
food();
//*********************************************
********************************************
void drinks()
clrscr();
gotoxy(35,3);
cout<<"SOFT DRINKS";
gotoxy(15,5);
cout<<"****************************************************
*****************";
gotoxy(15,7);
cout<<"31.FRUIT BEER ............ 150.00";
gotoxy(15,8);
gotoxy(15,9);
gotoxy(15,10);
gotoxy(15,11);
gotoxy(15,12);
gotoxy(15,13);
gotoxy(55,22);
getch();
ft.close();
food();
}
//
**********************************************
*******************************
float order()
clrscr();
int ch[50],n,q[10];
int amt,tot=0;
p:
clrscr();
ft.open("res.dat",ios::app|ios::binary);
if(!ft)
exit(getch());
}
gotoxy(15,6);
cin>>n;
e.s=n;
for(int i=0;i<n;i++)
gotoxy(15,2*i+8);
cin>>ch[i];
if((ch[i]>=1)&&(ch[i]<=36))
gotoxy(15,2*i+9);
cin>>q[i];
if(ch[i]==1)
amt=150*q[i];
tot=tot+amt;
}
if(ch[i]==2)
amt=50*q[i];
tot=tot+amt;
if(ch[i]==3)
amt=140*q[i];
tot=tot+amt;
if(ch[i]==4)
amt=40*q[i];
tot=tot+amt;
if(ch[i]==5)
amt=100*q[i];
tot=tot+amt;
}
if(ch[i]==6)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==7)
amt=350*q[i];
tot=tot+amt;
if(ch[i]==8)
amt=300*q[i];
tot=tot+amt;
if(ch[i]==9)
amt=150*q[i];
tot=tot+amt;
}
if(ch[i]==10)
amt=250*q[i];
tot=tot+amt;
if(ch[i]==11)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==12)
amt=250*q[i];
tot=tot+amt;
if(ch[i]==13)
amt=100*q[i];
tot=tot+amt;
}
if(ch[i]==14)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==15)
amt=100*q[i];
tot=tot+amt;
if(ch[i]==16)
amt=250*q[i];
tot=tot+amt;
if(ch[i]==17)
amt=100*q[i];
tot=tot+amt;
}
if(ch[i]==18)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==19)
amt=50*q[i];
tot=tot+amt;
if(ch[i]==20)
amt=200*q[i];
tot=tot+amt;
if(ch[i]==21)
amt=90*q[i];
tot=tot+amt;
}
if(ch[i]==22)
amt=120*q[i];
tot=tot+amt;
if(ch[i]==23)
amt=100*q[i];
tot=tot+amt;
if(ch[i]==24)
amt=250*q[i];
tot=tot+amt;
if(ch[i]==25)
amt=150*q[i];
tot=tot+amt;
}
if(ch[i]==26)
amt=100*q[i];
tot=tot+amt;
if(ch[i]==27)
amt=75*q[i];
tot=tot+amt;
if(ch[i]==28)
amt=475*q[i];
tot=tot+amt;
if(ch[i]==29)
amt=70*q[i];
tot=tot+amt;
}
if(ch[i]==30)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==31)
amt=150*q[i];
tot=tot+amt;
if(ch[i]==32)
amt=50*q[i];
tot=tot+amt;
if(ch[i]==33)
amt=75*q[i];
tot=tot+amt;
}
if(ch[i]==34)
amt=200*q[i];
tot=tot+amt;
if(ch[i]==35)
amt=100*q[i];
tot=tot+amt;
if(ch[i]==36)
amt=100*q[i];
tot=tot+amt;
else
delay(500);
goto p;
}
tol=tot;
} menu();
//
**********************************************
**************************
void bill()
for(int i=15;i<=65;i++)
gotoxy(i,3);//row wise
cout<<c1;
for(i=16;i<=65;i++)
gotoxy(i,20);//row wise
cout<<c1;
}
for(i=3;i<=20;i++)
gotoxy(15,i);//column wise
cout<<c1;
for(i=3;i<=20;i++)
gotoxy(65,i);//column wise
cout<<c1;
gotoxy(33,5);
gotoxy(30,6);
cout<<"Saket,S.Delhi";
gotoxy(33,7);
cout<<"PH-22583652";
gotoxy(30,12);
cout<<"TOTAL ITEMS::"<<e.s;
gotoxy(45,9);
gotoxy(42,15);
cout<<"SubTotal::"<<tol;
gotoxy(33,16);
v=(tol * 0.07);
gotoxy(45,17);
e.m=v+tol;
cout<<"Total:: "<<e.m;
gotoxy(34,19);
count++;
mrec=count;
ft.seekp(mrec);
ft.write((char *)&e,sizeof(e));
cout<<"THANK YOU";
getch();
ft.close();
menu();
}
//
**********************************************
************************
void feedback()
clrscr();
char s[50];
cout<<"\nQuality of food:{good,medium,bad}";
cin>>s;
cin>>s;
gets(s);
ft.close();
menu();
}
OUTPUT
2. WELCOME SCREEN
3. MAIN MENU