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 the room. Replace the Get_Number() method by the method Display_Number(), which displays the room number and add the method Display_Guest(), which displays the guest member. Replace the four argument constructor by a five argument constructor in which the first argument is the room bumber, 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 messafe 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.
1
Expert's answer
2012-11-19T08:41:25-0500
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.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment