Question

In: Computer Science

For this assignment you will be creating a basic Hotel Reservation System. The program must meet...

For this assignment you will be creating a basic Hotel Reservation System. The program must meet the following guidelines:

  • User can reserve up to 3 rooms at a time
    • Your program will need to loop through to continue to ask needed questions to determine cost.
  • Room rates (room variants):
    • Suite $250
    • 2 Queens $150
    • 1 King $175
    • Ocean view add $50
    • Fridge for Room $25
    • Pets additional $50
  • Sales tax rate will be 5.5%
  • Your program will show out the total for each room reserved after the user has put in the necessary information. Once all rooms are entered the program will print out the grand total.

Make sure you are using Variables, Looping, and decision statements!

Solutions

Expert Solution

Answer: Hey! Kindly find your solution here. You didn't mention any particular language in question that's why I used here c++ for this program. This program is error-free and working well. If you any queries, feel free to ask me. Thanks.

#include<iostream>
#include<iomanip>
#include<stdlib.h>
using namespace std;

int main()
{
   float grand_total=0,tax,total;
   int bed_num,n;
   char ocean_view,fridge,pets,suite,bed;
   cout<<"Hotel Reservation System";
   cout<<endl<<"How many rooms do you want to book?";
   cout<<endl<<"you can upto 3 rooms at a time";
   cin>>n;
   cout<<endl<<"Please answer below questions to determine the cost of a room";
   for(int i=1;i<=n;i++)
   {
   total = 0;
       cout<<endl<<"Do you want to book a Suite?Y/N";
       cin>>suite;
       if(suite=='Y')
       {
           total = total+250;
       }
       else
       {
       exit(0);
       }
       cout<<endl<<"Which type of bed do you want? Please enter a letter-";
       cout<<endl<<"Q-queen or K-king";
       cin>>bed;
       cout<<endl<<"How many bed do you want?";
       cin>>bed_num;
       if(bed=='Q')
       {
           total = total+bed_num*75;
       }
       else
       if(bed=='K')
       {
           total = total+bed_num*175;
       }
       cout<<endl<<"Do you want Ocean view from room?Y/N";
       cin>>ocean_view;
       if(ocean_view=='Y')
       {
           total = total+50;
       }
       cout<<endl<<"Do you want Fridge at your room?Y/N";
       cin>>fridge;
       if(fridge=='Y')
       {
           total = total+25;
       }
       cout<<endl<<"Do you have pet?Y/N";
       cin>>pets;
       if(pets=='Y')
       {
           total =total+50;
       }
       tax = total*5.5/100;
       total = total+tax;
       grand_total = grand_total+total;
  
   }
       cout<<fixed<<setprecision(2)<<"Room's "<<"cost is: $"<<grand_total;
   return 0;
}


Related Solutions

using c++ You have been contracted to build a hotel reservation system. This is the system...
using c++ You have been contracted to build a hotel reservation system. This is the system that hotel desk clerks will use to take desk reservations. Assumptions: This is acting as though the only reservations taken are at the desk. All reservations are for one night. The hotel is empty when you start the program. First, this program will give the full inventory of rooms in the hotel. Total rooms: 122 There are four types of rooms with these prices:...
Create a Database Schema for a hotel reservation system. indicate the Primary Keys, Foreign Keys, and...
Create a Database Schema for a hotel reservation system. indicate the Primary Keys, Foreign Keys, and the one-to-one or one-to-many relationships between the tables. Also describe in a small paragraph the scope of the back-end database, by explaining the different tables and their relations in your schema.
Java homework problem. This is my hotel reservation system. I'm trying to add a few things...
Java homework problem. This is my hotel reservation system. I'm trying to add a few things to it. You will be changing your Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects. For this project you will be modifying the Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects. You will be create a Room object that will allow the...
Use Visual Basic Language In this assignment you will need to create a program that will...
Use Visual Basic Language In this assignment you will need to create a program that will have both a “for statement” and an “if statement”. Your program will read 2 numbers from the input screen and it will determine which is the larger of the 2 numbers. It will do this 10 times. It will also keep track of both the largest and smallest numbers throughout the entire 10 times through the loop. An example of the program would be...
Creating a children’s book of your choice! -For this assignment, you must create an original story...
Creating a children’s book of your choice! -For this assignment, you must create an original story of your own making. -The story should be at least 5 pages long. (If your text is very short, you can consider full-page illustrations.) -You can choose the form of your text (i.e. will it be a poem? A rhyming narrative? Will it include rhyme at all? Will it be a fairy tale? Will it be an extended lyrical poem? Will it be a...
Creating a children’s book of your choice! -For this assignment, you must create an original story...
Creating a children’s book of your choice! -For this assignment, you must create an original story of your own making. -The story should be at least 5 pages long. (If your text is very short, you can consider full-page illustrations.) -You can choose the form of your text (i.e. will it be a poem? A rhyming narrative? Will it include rhyme at all? Will it be a fairy tale? Will it be an extended lyrical poem? Will it be a...
Write a C++ program that start the assignment by creating a file named pointerTasks.cpp with an...
Write a C++ program that start the assignment by creating a file named pointerTasks.cpp with an empty main function, then add statements in main() to accomplish each of the tasks listed below. Some of the tasks will only require a single C++ statement, others will require more than one. For each step, include a comment in your program indicating which step you are completing in the following statement(s). The easiest way to do this is copy and paste the below...
Write a C++ program that start the assignment by creating a file named pointerTasks.cpp with an...
Write a C++ program that start the assignment by creating a file named pointerTasks.cpp with an empty main function, then add statements in main() to accomplish each of the tasks listed below. Some of the tasks will only require a single C++ statement, others will require more than one. For each step, include a comment in your program indicating which step you are completing in the following statement(s). The easiest way to do this is copy and paste the below...
Write a program for hotel booking system using C++ Program Requirement 1. You can write any...
Write a program for hotel booking system using C++ Program Requirement 1. You can write any program based on the title assigned. 2. The program must fulfill ALL the requirements below. The requirements listed below are the MINIMUM requirement. Your program may extend beyond the requirements if needed. a) Create at least one (1) base class. b) Create at least two (2) derived classes that inherit from the base class created in 2(a). c) Create at least one (1) object...
CSC 466 Spring 2017 Assignment:: A6 Basic Type System --------------------------------------------------------------- Your assignment: Build the basic type...
CSC 466 Spring 2017 Assignment:: A6 Basic Type System --------------------------------------------------------------- Your assignment: Build the basic type system - type set at declaration - consult sym-tab on var usage - build type of expression based on parts - LHS = RHS types should match ** Also make sure vars are declared of course Note:: we started this in class -- start with the project you already have from /tmp/466T/ic0315.tar.gz that we worked on in class on Wed 3/15 ************************************************************* Kinds of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT