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. h" 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 l
privates
string reservationNane_; // reservation name
Date reservationDate_; // reservation date
float reservationfee; // reservation fee
protected:
bool is_high_season() const;
public:
Reservation(const string &reservationflame, int day, int month, float fee =0);
double calculate_cost() const;
string to_string() const;
};
Here is more information about the member functions of the Reservation class.
Reservation (const string freservationName, int day, int month, float fee -0):
This function is to create a Reservation object by setting the data members using the parameters provided.
otring to_etring() consts
This function is to return a string explaining the invoking Reservation object. For example, given the following code segment:
Reservation r1("Valeatine Day Reservation", 14,2,2a);
cout "InReservation Detalts:" endl;
cout 1, to_string() endt;
Here's its expected output:
Reservation Detalls:
Yalent ine Day Reservation on 6214
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 0214 is 44 day(s) from January 1
 The Reservation Class This class is created to handle generic reservations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!