Sunday, April 24, 2016

/*********************************************************
 HEADER FILES INCLUDED
*********************************************************/

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<process.h>
#include<iomanip.h>
#include<ctype.h>
#include<stdlib.h>

/*********************************************************
      STRUCTURE
*********************************************************/

struct var
{
int pass;
int choice;
}x;


/*********************************************************
FUNCTION FOR INFORMTION
*********************************************************/
void info()
{
clrscr();
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotel";
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotels is Europe’s oldest luxury hotel group with a history of more than 110 years. The history of this traditional company with its head office in Geneva began in 1897 with the foundation of the ‘Hotelbetriebs-Aktiengesellschaft’ in Berlin. This was the time when thefirst comfortable hotels were already appearing in the biggest German city, and included some belonging to the ’Hotelbetriebs-Aktiengesellschaft’. A parallel development was that of M. Kempinski & Co, founded by Berthold Kempinski, which was acquired by the ‘Hotelbetriebs-Aktiengesellschaft’ in 1953.";
cout<<"\n\n";

}

/*********************************************************
FUNCTION FOR FOOD MENU
*********************************************************/

void fmenu()
{
clrscr();
char choice='Y';

int order = 1;

int num1=0, num2=0, num3=0, num4=0, num5=0;
int num_customers;
int sentinel=0;
const double UnitPrice1= 6.95, UnitPrice2= 5.75,UnitPrice3= 7.25, UnitPrice4= 8.95, UnitPrice5= 4.95;
double AmountofSale1=0, AmountofSale2=0, AmountofSale3=0, AmountofSale4=0, AmountofSale5=0;
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotel";
cout<<"\n";
cout.width(46);
cout<<"___________________Menu________________\n\n"
<<"_____(1) Buffalo_Wings    $6.95_____\n"
<<"_____(2) Super_Burger    $5.75_____\n"
<<"_____(3) Italian_Sandwich        $7.25_____\n"
<<"_____(4) Shrimp_Nuggets    $8.95_____\n"
<<"_____(5) Veggie_Supreme    $4.95_____\n"
<<"_____(6) Exit                            exit_____\n";



while (order != sentinel)
{
cout<<"From the list of food, what would you like:\n";
cin>>order;
switch(order)
{

case 0:
break;
case 1:cout<<"How many Buffalo Wings would you like to order:\n";
      cin>>num1;
      AmountofSale1 = UnitPrice1 * num1;
break;
case 2:cout<<"How many Super Burgers would you like to order:\n";
      cin>>num2;
      AmountofSale2= UnitPrice2 * num2;
break;
case 3:cout<<"How many Italian Sandwiches would you like to order:\n";
      cin>>num3;
      AmountofSale3= UnitPrice3 * num3;
break;
case 4:cout<<"How many Shrimp Nuggets would you like to order:\n";
      cin>>num4;
      AmountofSale4= UnitPrice4 * num4;
break;
case 5:cout<<"How many would Veggie Supremes you like to order:\n";
      cin>>num5;
      AmountofSale5= UnitPrice5 * num5;
break;
case 6:exit(0);
break;

default: cout<<"Please choose a valid item from our list\n";
}


{

cout<<"You have ordered:\n\n";

cout<<setw(15)<<"ITEM"<<setw(10)<<"QUANTITY"<<setw(15)<<"UNIT PRICE"<<setw(20)<<"AMOUNT OF SALE\n";


cout<<"Buffalo Wings"<<setw(6)<< num1 <<setw(16)<< UnitPrice1 <<setw(20) << AmountofSale1<<endl;

cout<<"Super Burger:"<<setw(6)<< num2 <<setw(16)<< UnitPrice2 <<setw(20) << AmountofSale2<<endl<<endl;

cout<<"Italian Sandwich:"<<setw(6)<< num3 <<setw(16)<< UnitPrice3 <<setw(20) << AmountofSale3<<endl<<endl;

cout<<"Shrimp Nuggets:"<<setw(6)<< num4 <<setw(16)<< UnitPrice4 <<setw(20) << AmountofSale4<<endl<<endl;

cout<<"Veggie Supreme:"<<setw(6)<< num5 <<setw(16)<< UnitPrice5 <<setw(20) << AmountofSale5<<endl<<endl;
}

}
}
/*********************************************************
     FUNCTION FOR CUSTOMER RECORD
*********************************************************/

void record()
{
clrscr();
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotel";
cout<<"\n";
cout.width(46);
cout<<"---------------";
cout<<"\n\n";
cout<<"1.Enter a new record\n\n2.Edit a record\n\n3.Delete an existing record\n\n4.View a record\n\n5.Exit\n\nEnter your choice:";

}

/*********************************************************
FUNCTION TO BOOK ROOM
*********************************************************/

void book()
{
clrscr();
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotel";
cout<<"\n";
cout.width(46);
cout<<"---------------";
cout<<"\n\n";
cout<<"1.Deluxe\n\n2.Super Deluxe\n\n;3.Exit\n\nEnter your choice: ";
}

/*********************************************************
  MAIN MENU FUNCTION
*********************************************************/

void mainmenu()
{
clrscr();
cout<<"\n";
cout.width(46);
cout<<"Kempinski Hotel";
cout<<"\n";
cout.width(46);
cout<<"---------------";
cout<<"\n\n";
cout<<"1.Book a room\n\n2.Customer's records\n\n3.Food Menu\n\n4.Information\n\n5.Exit\n\n";
cout<<"Enter your choice: ";
cin>>x.choice;
switch(x.choice){
case 1: book();
break;
case 2: record();
break;
case 3: fmenu();
break;
case 4: info();
break;
case 5: exit(0);
default:
cout<<"Invalid choice";

     }


}

/*********************************************************
    MAIN MENU
*********************************************************/

void main()
{
clrscr();
int pass;
 cout<<"\n\n\n\n\n\n\n\n\n\n\n";
cout.width(46);
 cout<<"Kempinski Hotel";
 cout<<endl;
 cout.width(46);
 cout<<"---------------";
 cout<<endl;
 cout.width(40);
 cout<<"Password:";
 cin>>x.pass;
if(x.pass==1)
   {
mainmenu();
}
 else{
exit(0);
}
getch();
}

1 comment: