Question: In C++ Write the header file Hotel.h for a Hotel class. The Hotel class has the following data members: 1) an array of 100 Room
In C++
Write the header file Hotel.h for a Hotel class. The Hotel class has the following data members: 1) an array of 100 Room objects. 2) hotel name and 3) the number of occupied rooms. The Room is represented as a struct in a room.h file. The Room structure has the following data members: 1) Room Number 2) Primary Guest Full Name and 3) Room Cost per Night. In addition, provide the following member function prototypes for the Hotel class:
Hotel Constuctor: string hotelName parameter.
assignRoom(...): double roomNumber and string guestName parameters, returns nothing
unAssignRoom(...) : integer roomNumber parameter, returns nothing
getNumberOfAssignedRooms() : no parameters and returns the number of assigned rooms.
getCostOfRoom(...): double roomNumber parameter and returns the cost of the room
Do not provide the implementation of the member functions.
#ifndef ROOM_H
#define ROOM_H
//Place code here for Room Struct
#endif
///////////////////////////////////////////////////
#ifndef HOTEL_H
#define HOTEL_H
//Place code here for Hotel Class
#endif
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
Certainly Below is the outline for the Room struct and the Hotel class header defining the required ... View full answer
Get step-by-step solutions from verified subject matter experts
