Question

In: Computer Science

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:

  • Standard Rooms, Courtyard - 70 - $125 a night
  • Standard Room, Scenic - 35 - $145 a night
  • Deluxe Suite - 15 - $350 a night
  • Penthouse - 2 - $1135 a nigh

    Second, the program will allow for a room to be reserved for one night. The program will keep track of the inventory as rooms are being reserved.

    Third, the program will keep track of revenue brought in for the day from reserved rooms.

    Fourth, the user can choose a getTotal() function that will display remaining room inventory, what was reserved and revenue generated for the day.

  • PLEASE NOTE: This project must incorporate a class friend or class inheritance structure.

Solutions

Expert Solution

#include<iostream>
using namespace std;
class hotel
{
    public:
    int totalrooms=112;
    int Standard_Rooms_Courtyard = 70;
    int Standard_Room_Scenic = 35;
    int Deluxe_Suite = 15;
    int Penthouse = 2;
    
    void getTotal()
    {
        cout<<totalrooms<<": Total remaining rooms\n"<<Standard_Rooms_Courtyard
        <<": Standard_Rooms_Courtyard \n"<<Standard_Room_Scenic<<": Standard_Room_Scenic \n"
        <<Deluxe_Suite<<": Deluxe_Suite \n"<<Penthouse<<": Penthouse\n";
    }
};
class price : public hotel
{
    public:
    float Standard_Rooms_Courtyard = 125;
    float Standard_Room_Scenic = 145;
    float Deluxe_Suite = 350;
    float Penthouse = 1135;
    float netprice=0;
    
    void getTotal()
    {
        cout<<"\nnetprice: "<<netprice;
    }
    void booking()
    {
        cout<<"\nPlease enter your choice\n1. Standard Rooms, Courtyard - 70 - $125 a night\n2. Standard Room, Scenic - 35 - $145 a night\n3. Deluxe Suite - 15 - $350 a night\n4. Penthouse - 2 - $1135 a night\n";
        int choice;
        booking:
        cin>>choice;
        switch(choice)
        {
            case 1:hotel::Standard_Rooms_Courtyard--;
            netprice+=Standard_Rooms_Courtyard;
            hotel::totalrooms--;
            break;
            case 2:hotel::Standard_Room_Scenic--;
            netprice+=Standard_Room_Scenic;
            hotel::totalrooms--;
            break;
            case 3:hotel::Deluxe_Suite--;
            netprice+=Deluxe_Suite;
            hotel::totalrooms--;
            break;
            case 4:hotel::Penthouse--;
            netprice+=Penthouse;
            hotel::totalrooms--;
            break;
            default :cout<<"\nthat was a wrong choice\nplease try again\n";
            goto booking;
            break;
        }
    }
    
};
int main()
{
    price p;
    start:
    cout<<"\nPlease select you choice\n";
    cout<<"\n1. Hotel booking\n2. total remaining rooms\n3. netprice\n0. Exit";
    int choice;
    cin>>choice;
    switch(choice)
    {
        case 0:break;
        case 1:p.booking();
        goto start;
        break;
        case 2:p.hotel::getTotal();
        goto start;
        break;
        case 3:p.getTotal();
        goto start;
        break;
        default :cout<<"\nthat was a wrong choice\nplease try again\n";
        goto start;
        break;
    }
}

I hope it helps.


Related Solutions

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...
Tema Container Terminal (TCT) plans to build a new container terminal. You have been contracted to...
Tema Container Terminal (TCT) plans to build a new container terminal. You have been contracted to determine the land area for the new terminal. Explain the factors you will consider and how these factors will affect the land area for the terminal
Tema Container Terminal (TCT) plans to build a new container terminal. You have been contracted to...
Tema Container Terminal (TCT) plans to build a new container terminal. You have been contracted to determine the land area for the new terminal. Explain the factors you will consider and how these factors will affect the land area for the terminal.
Use the code below as the basis for a hotel reservation system (HRS). The customer calls...
Use the code below as the basis for a hotel reservation system (HRS). The customer calls the hotel front desk to book a room. The front desk is running your software on one of its computers. The basic operations available are: book one room, book two adjoining rooms, list all unoccupied rooms, list all occupied rooms, help lists information about available methods, report percent of hotel rooms that are unoccupied, quit the system (shut the system down). The people at...
bus reservation system code using c language in this system we can add seat and remove....
bus reservation system code using c language in this system we can add seat and remove. this code will be in c language using 2 d aray
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.
You have been appointed as the new general manager of a named hotel. The hotel is...
You have been appointed as the new general manager of a named hotel. The hotel is not performing as expected and is not meeting its target. Your first assignment is to resolve this problem. Describe in details how you would go about addressing this problem. Hint: Describe the data collection approaches you would use (Observation, interviews, surveys, historical research (past 5 years), etc.) and why you chose this specific form of data collection etc.
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...
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...
Build a conceptional model for a Hotel Management System. The solution should be presented as an...
Build a conceptional model for a Hotel Management System. The solution should be presented as an ER-diagram. Base your design on the following requirements. • The database should record information about Customer, Hotel, Booking, Rooms, Employee, Feedback, and Payments. • A Customer has a name which consists of firstName, middleName and lastName. Customers are identified by a unique customerID. A Customer has an Address, phoneNo and email address – Customers can place any number of Bookings (including none). Customer may...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT