Project:-MASTER CHEF RESTRO....

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

//Project :-MASTER CHEF RESTRO.....

//Made by :-NIDHI VATSA & SHRADHA JALHOTRA......

#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();

}
/*****************************************

FUNCTION TO CHECK PASSWORD

******************************************/

void password()

{ char pass[]={'p','h','y','s','i','\0'};

clrscr();

char password[5];

int value;

p:

clrscr();

gotoxy(25,12);

cout<<"Enter your password:";

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;

char *a="W E L C O M E ";

char *b="T O";

char *c="MASTER CHEF RESTRO";

char *d="PROJECT BY NIDHI VATSA & SHRADHA JALHOTRA";

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()

char a[30]="BYE-BYE VISIT AGAIN";

clrscr();

gotoxy(20,6);

cout<<a;

gotoxy(20,8);

cout<<"THANK YOU FOR COMING TO THE HOTEL";

gotoxy(40,12);

cout<<"HAVE A GOOD DAY...!";

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);

cout<<"Enter your choice::"; clreol();

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)

cout<<"NO RECORD HAS BEEN ADDED";

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);

cout<<"7.Return to Main Menu";

gotoxy(55,20);

cout<<"Enter your choice::";

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);

cout<<"1.PAN PIZZA ........... 150.00";

gotoxy(15,9);

cout<<"2.MACARONY ........... 50.00";

gotoxy(15,10);

cout<<"3.PAPAYA SALAD ........... 140.00";

gotoxy(15,11);

cout<<"4.SHANSHAU ........... 40.00";

gotoxy(15,12);

cout<<"5.PASTA ........... 100.00";

gotoxy(15,13);

cout<<"6.SPL. SUPER RONI ........... 150.00";

gotoxy(15,14);

cout<<"Remember item code of your choice";

gotoxy(55,22);

cout<<"Press any key to continue";


getch();

ft.close();

food();

//
**********************************************
*******************************
void indian()

clrscr();

gotoxy(35,5);

cout<<"Indian food";

gotoxy(15,6);

cout<<"***************************************************"
;

gotoxy(15,8);

cout<<"7.TANDOORI CHICKEN .......... 350.00";

gotoxy(15,9);

cout<<"8.AFGANI CHICKEN .......... 300.00";

gotoxy(15,10);
cout<<"9.MAKHNI DAL ........... 150.00";

gotoxy(15,11);

cout<<"10.SHAHI PANEER ........... 250.00";

gotoxy(15,12);

cout<<"11.MIX VEG ........... 150.00";

gotoxy(15,13);

cout<<"12.SPL MASTER CHEF THALI ........... 250.00";

gotoxy(15,14);

cout<<"Remember item code of your choice";

gotoxy(55,22);

cout<<"Press any key to continue";

getch();

ft.close();

food();

//
**********************************************
*******************************
void chinese()

{
clrscr();

gotoxy(35,5);

cout<<"CHINESE FOOD";

gotoxy(15,6);

cout<<"***************************************************"
;

gotoxy(15,8);

cout<<"13.EGG NOODLES .......... 100.00";

gotoxy(15,9);

cout<<"14.HAKKA NOODLES .......... 150.00";

gotoxy(15,10);

cout<<"15.MOMOS .......... 100.00";

gotoxy(15,11);

cout<<"16.VEG.MANCHURIAN .......... 250.00";

gotoxy(15,12);

cout<<"17.FRIED RICE .......... 100.00";

gotoxy(15,13);

cout<<"18.CHILLY POTATO .......... 150.00";

gotoxy(15,14);

cout<<"Remember item code of your choice";


gotoxy(55,22);

cout<<"Press any key to continue";

getch();

ft.close();

food();

//
**********************************************
*****************************
void conti()

clrscr();

gotoxy(35,5);

cout<<"CONTINENTAL FOOD";

gotoxy(15,6);

cout<<"***************************************************"
;

gotoxy(15,8);

cout<<"19.PRAWNS .......... 150.00";

gotoxy(15,9);
cout<<"20.LONWABO .......... 200.00";

gotoxy(15,10);

cout<<"21.LEMONADE .......... 90.00";

gotoxy(15,11);

cout<<"22.GREENMADE .......... 120.00";

gotoxy(15,12);

cout<<"23.CRABS .......... 100.00";

gotoxy(15,13);

cout<<"24.MASTER CHEF SPL. .......... 250.00";

gotoxy(15,14);

cout<<"Remember item code of your choice";

gotoxy(55,22);

cout<<"Press any key to continue";

getch();

ft.close();

food();

//
**********************************************
*****************************
void desert()

clrscr();

gotoxy(35,4);

cout<<"DESERT";

gotoxy(15,5);

cout<<"***************************************************"
;

gotoxy(15,7);

cout<<"25.Viva la Raza .......... 150.00";

gotoxy(15,8);

cout<<"26.SHREEGENE .......... 100.00";

gotoxy(15,9);

cout<<"27.ASGENENE .......... 75.00";

gotoxy(15,10);

cout<<"28.KAJU BARFI(1 KG) .......... 475.00";

gotoxy(15,11);

cout<<"29.RASMALAI .......... 70.00";

gotoxy(15,12);

cout<<"30.JALEBI WITH RABADI .......... 150.00";


gotoxy(15,13);

cout<<"Remember item code of your choice";

gotoxy(55,22);

cout<<"Press any key to continue";

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);

cout<<"32.LIME JUICE ............ 50.00";

gotoxy(15,9);

cout<<"33.CHOCOLATE SHAKE ............ 75.00";

gotoxy(15,10);

cout<<"34.CAPPACHINO ............ 200.00";

gotoxy(15,11);

cout<<"35.LEMON TEA ............ 100.00";

gotoxy(15,12);

cout<<"36.MOCK DRILLS ............ 100.00";

gotoxy(15,13);

cout<<"Remember item code of your choice";

gotoxy(55,22);

cout<<"Press any key to continue";

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)

cout<<"please try again";

exit(getch());

}
gotoxy(15,6);

cout<<"Enter the number of dishes you need::\t";

cin>>n;

e.s=n;

for(int i=0;i<n;i++)

gotoxy(15,2*i+8);

cout<<"Enter your choice::\t";

cin>>ch[i];

if((ch[i]>=1)&&(ch[i]<=36))

gotoxy(15,2*i+9);

cout<<"Enter the quantity::\t";

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

{ cout<<" Wrong choice::";

delay(500);

goto p;
}

tol=tot;

} menu();

//
**********************************************
**************************
void bill()

clrscr(); char c1=char(219);

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);

cout<<"MASTER CHEF RESTRO";

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);

cout<<"Local tax (7per.)::"<<v;

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;

cout<<"\nQuality of the service:(*****,***,**)";

cin>>s;

cout<<"\nAny suggestion or opinion for further improvement:";

gets(s);

cout<<"\nReturn to main menu";

ft.close();

menu();

}
OUTPUT
2. WELCOME SCREEN
3. MAIN MENU

4. VIEWING RESTRAUNT’S MENU


5. VIEWING ITALIAN FOOD MENU
6. PLACING ORDER
7. VIEWING ITEMIZED BILL
8. VIEWING RECORDS
9. ENTERING FEEDBACK
10. EXIT SCREEN

You might also like