Online Restaurant Management System Project in C++

Online Hotel Management System Facilitates its User to Buy  food Items and Pay Bills Online which Save the time of both the Management and Customers . User Can also got a Membership of the hotel through which he will be Able to get some Packages of the Hotel.

Source Code 


#include <iostream>
#include <cctype>
using namespace std;

/*
Design a system for a restaurant in which users can order multiple food items from the following menu:
1. Press something to buy pizza 
2. Press something to buy rice
3. Press something to buy spaghetti 
4. Press something to buy tea
5. Press something to buy roast
User enters their balance in her credit card.
User can buy multiple products if she has desired balance.
If user is a member of the restaurant then system should give 10% discount.
At the end add 16% GST on total bills and deduct money from credit card.
*/
int main()
{
 const float GST=0.16,discount=0.10;
 int Pizza= 1500,Rice= 350,Spaghetti=500,Tea=30,Roast=500;
 float accountBalance=0,totalBill=0,finalBill=0,currentBill=0;
 char menu,membership,answer;
 cout<<endl<<endl<<"************** AN RESTAURANT ***************"<<endl<<endl;
 cout<<"Enter Account Balance: ";
 cin>>accountBalance;
 cout<<endl<<"Do you have membership in our restaurant (y/n): ";
 cin>>membership;
 do
 {
  bool hasBalance=false;
  cout<<endl<<"=============Menu============="<<endl
   <<"1. Press '1' to Buy Pizza"<<endl
   <<"2. Press '2' to Buy Rice"<<endl
   <<"3. Press '3' to Buy Spaghetti"<<endl
   <<"4. Press '4' to Buy Tea"<<endl
   <<"5. Press '5' to Buy Roast"<<endl
   <<endl<<"Please select Items from the menu: ";
  cin>>menu;
  switch(menu)
  {
  case '1':
   if (accountBalance>=(Pizza+Pizza*GST))
   {
    totalBill=Pizza;
    hasBalance=true;
   }         //if (accountBalance>=(Pizza+Pizza*GST)){ case '1'
   break;
  case '2':
   if (accountBalance>=(Rice+Rice*GST))
   {
    totalBill=Rice;
    hasBalance=true;
   }         //if (accountBalance>=(Rice+Rice*GST)){ case '2
   break;
  case '3':
   if (accountBalance>=(Spaghetti+Spaghetti*GST))
   {
    totalBill=Spaghetti;
    hasBalance=true;
   }         //if (accountBalance>=(Spaghetti+Spaghetti*GST)){ case '3'
   break;
  case '4':
   if (accountBalance>=(Tea+Tea*GST))
   {
    totalBill=Tea;
    hasBalance=true;
   }         //if (accountBalance>=(Tea+Tea*GST)){ case '4'
   break;
  case '5':
   if (accountBalance>=(Roast+Roast*GST))
   {
    totalBill=Roast;
    hasBalance=true;
   }         //if (accountBalance>=(Roast+Roast*GST)){ case '5'
   break;
  default:
   cout<<endl<<"You entered a wrong number"<<endl;
  }            //switch(menu)
  if(hasBalance==true)
  {
   if (tolower(membership)=='y')
   {
    finalBill+=totalBill+(totalBill*GST)-(totalBill*discount);
    currentBill=totalBill+(totalBill*GST)-(totalBill*discount);
   }
   else
   {
    finalBill+=totalBill+(totalBill*GST);
    currentBill=totalBill+(totalBill*GST);
   }            //if (tolower(membership)=='y')
   accountBalance-=currentBill;
   cout<<endl<<"Final Bill = "<<finalBill<<endl;
   cout<<endl<<"Remaining Balance = "<<accountBalance<<endl;
  }                //if(hasBalance==true)
  else
  {
   cout<<endl<<"You don't have Sufficent Money"<<endl;
   hasBalance=false;
  }//end else
  cout<<endl<<"Do you want to continue (y/n): ";
  cin>>answer;
 }while (tolower(answer)=='y');
cout<<endl<<"Your Final Bill is = "<<finalBill<<endl;
cout<<endl<<"Remaining Balance = "<<accountBalance<<endl;
return 0;
}


Output of the Program


AN Restaurant Management System

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.

12 comments:

  1. That's one of the nice logic for noobs , so after this they can easily move towards the classes.
    whatsapp:+923341524004

    ReplyDelete
  2. hi i am changing the foods but why is it keep on having an error and it says was not declared in this scope?

    ReplyDelete
  3. Really helpful for developers who are working on Restaurant management Solution Software. In the coming years this software will definitely boom the food and beverages industry.

    ReplyDelete
  4. Hello,

    Great post!!!

    This is an awesome post. Thanks for sharing the information about Restaurant management system project in C++.

    This is really an awesome post and very informative and creative. This sharing concept is a good way to enhance the knowledge. Thank you very much for this post. I like this site very much.
    Website For Food Ordering

    Restaurant Website Ordering System

    Online Ordering System For Restaurants

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Can anyone give me an advice?
    Is this project is good enough to present in the final project for my programming course?

    ReplyDelete
  7. The article is very good and informative. Thank you for the author.

    For best billing software for retail please click below link.
    Retail Billing Software in Bangalore

    ReplyDelete
  8. Can you help me doing a flowchart for this code. Please, i need it for my final. Thank you

    ReplyDelete
  9. One of the best blog content for restaurant management and services by software, Its very systematic
    Restaurant management software development company

    ReplyDelete