Answer to Question #17996 in C++ for Mikey
using namespace std;
void setRoomNumber(int roomNum);
int setRoomCapacity(int roomCap);
int setoccupancyStatus(int occupStatus);
double setdailyRate(double dRate);
void initRoom(int roomNum,int roomCap, double roomRate, int occupStatus);
int ChangeStatus(int occupStatus);
double ChangeRate(double roomRate);
void HotelRoom::setRoomNumber(int roomNum)
_roomNumber = roomNum;
int HotelRoom::setRoomCapacity(int roomCap)
_roomCapacity = roomCap;
Refer to programming Problem 4 in section 11.1. Add the following methods to the hotel room class:: an accessor method for each instance variable of the class (Get_Number (), Get_Capacity (), Get_Status () and Get_Rate ()); a one-argument method Change_Status () that changes the occupancy status of the room to the value of its argument. The method should verify that the argument value does not exceed the room capacity. If it does, the method should return -1. Finally, add this method to the method to the hotel room class:: a one-argument method Change_Rate () that sets the room rate to the value of its argument.
Write a main () that creates a hotel room with room number 123, with a capacity of 4, and a rate of 150.00. Suppose a person checks in. the program should ask the user to enter the number of guests to occupy the room. Change the status of the room to reflect the number of guests that just checked in. display the information about the room in a nicely formatted way. Now assume that the guests check out. Change the status of the room appropriately and display the information about the room. Next, change the room rate to enter the number of guests to occupy the room. Change the room’s status accordingly and display the new information about the room.
Submit it with all requirements as an assignment to our control panel and we'll assist you.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!