Question: The Reservation Class This class is created to handle generic reservations or bookings. Add the Reservation. h and Reservation.cpp files to define and
The Reservation Class
This class is created to handle generic reservations or bookings. Add the "Reservation. and "Reservation.cpp files to define and implement the following Reservation class. Add appropriate statements in the main function to perform thorough festing of related member functions in the "maln.cpp file.
class Reservation
privates
string reservationNane; reservation name
Date reservationDate; reservation date
float reservationfee; reservation fee
protected:
bool ishighseason const;
public:
Reservationconst string &reservationflame, int day, int month, float fee ;
double calculatecost const;
string tostring const;
;
Here is more information about the member functions of the Reservation class.
Reservation const string freservationName, int day, int month, float fee :
This function is to create a Reservation object by setting the data members using the parameters provided.
otring toetring consts
This function is to return a string explaining the invoking Reservation object. For example, given the following code segment:
Reservation rValeatine Day Reservation", a;
cout "InReservation Detalts:" endl;
cout tostring endt;
Here's its expected output:
Reservation Detalls:
Yalent ine Day Reservation on
Hint reservation date can be extracted using the and then operators. First, the operator overioaded for the Date class can be used to send the following into a stringstream object since stringstream is a derived class of the ostream class.
The date is days from January
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
