Answer to Question #17996 in C++ for Mikey

Question #17996
#include <iostream> #include <iomanip> using namespace std; class HotelRoom { private: int _roomNumber; int _roomCapacity; int _occupancyStatus; double _dailyRate; public: HotelRoom(); void setRoomNumber(int roomNum); int getRoomNumber(); int setRoomCapacity(int roomCap); int getRoomCapacity(); int setoccupancyStatus(int occupStatus); int getoccupancyStatus(); double setdailyRate(double dRate); double getdailyRate(); 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::getRoomNumber() { return _roomNumber; } int HotelRoom::setRoomCapacity(int roomCap) { _roomCapacity = roomCap; return _roomCapacity; } int HotelRoom::getRoomCapacity() { return _roomCapacity; 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.
Expert's answer
Unfortunately, your question requires a lot of work and cannot be done for free.
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!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog