#include #include using namespace std; class HotelRoom { private: int _roomNumbe
ID: 3656159 • Letter: #
Question
#include #include 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; Recode the HotelRoom class of programming Problem 4, Section 10.3 as follows. Replace the string room number by a character array that stores a 3-character room number. Add the character pointer instance variable guest, which stores the name of the guest occupying room. Replace the Get_Number () method by the method Display_Get (), which displays the guest member. Replace the four argument constructor by a five-argument constructor in which the first argument is the room number, the second argument is the room capacity, the third argument is the room rate (defaulting to 89.00), the fourth argument is the guest name ( defaulting to the NULL pointer), and the fifth argument is the occupancy status (defaulting to zero). Use dynamic memory allocation to reserve space for the guest name. Code a destructor that deallocates the space allocated by the constructor. The destructor should also display a message that it executed. Recode the main () that you wrote to include use of the constructor, destructor, and new display methods. Compile, execute, and test the resulting program.Explanation / Answer
please repost as every thing has got mixed up and we are unable to read
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.