Question: Using C++ conduct the following Create a class hotel, which has hotel name, hotel address, number of guests, price per room, and number of rooms.
Using C++ conduct the following
Create a class hotel, which has hotel name, hotel address, number of guests, price per room, and number of rooms. Write one method, which reads data of class variables. Write a method called calc_ratio that calculates ratio (number of guests / number of room) of the hotel and return the result as double value. Write a display method to display the values of the class variables. Create two objects of hotel and printout the data of the object, which has more rooms, and print out the data of the object, which has more number of guests. The program also print out the data of the object which has lower ratio value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
