Saturday
December 20, 2014

Homework Help: programming

Posted by TOM on Friday, November 30, 2012 at 4:21pm.

There are several types of room in a hotel. The HotelRoom Class of Previous Programming Problem was not specific regarding the type of room. Assume that a hotel has guest rooms and meeting rooms. Modify the HotelRoom class as follows: remove the capacity and status instance variables and associated methods. Change the class constructor, copy constructor, and destructor accordingly. Derive from Hotel Room the classes Guestroom and Meeting Room. Guestroom contains the following data members: the integer instance variable capacity, which represents the maximum number of guests that can occupy the room; the integer instance variable status, which represents the number of guests in the room (0 if unoccupied); and the integer instance variable days, which represents the number of days the guest occupies the room. Meeting Room has the integer instance variable seats, which represents the number of seats in the room, and the integer instance variable status (1 if the room is booked for a meeting; 0 otherwise). Code all appropriate constructors, copy constructors and destructors for the classes. Code a function main () to test the classes. Make sure to create object of all types. Computer Science

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

algeBRA WORD PROBLEM - six familys split the cost of a family reunion. each ...
math - Help pleaseeee The Hotel Regal has 500 rooms. Currently the hotel is ...
precalculus - The Hotel Thomasina has 500 rooms. Currently the hotel is filled...
Math - The Hotel Regal has 600 rooms. Currently the hotel is filled . The daily ...
pre-calculus - The Hotel Florence has 550 rooms. Currently the hotel is filled...
math - Help please >.< The Hotel Lakewell has 450 rooms. Currently the ...
math/algebra - I need help in solving this word problem using linear system ...
Pre-Calculus - The Hotel Bellville has 400 rooms. Currently the hotel is filled...
math - A hotel has rooms numbered 1 to 1000. One thousand visitors enter the ...
Foreign languages - I'd like you to revise these sentences. I need to include ...

Search
Members