Question: Define three constructors A default constructor that sets the default values for the three members as numDays = 0 , numPeople = 0 , names

Define three constructors
A default constructor that sets the default values for the three members as numDays=0, numPeople=0, names = nullptrAn overloaded constructor that takes three parameters as input in the order of (int days, int people, string *names)A copy constructor that properly handles the deep copy of the member variable *names
Define a destructor that releases the memory of the *names member variable.
Overload the following operators
A '+' operator that allows the calculation of newVacation = oldVacation +5; (both newVacation and oldVacation are objects of FamilyVacation). This calculation will return a new vacation with 5 more days (i.e., add 5 to numDays member).A '+' operator that allows the calculation of newVacation = Vacation1+ Vacation2;, which will add the numDays of the Vacation1 and Vacation2 and merge the names lists of the two objectsA '==' operator that compares two FamilyVacation objects, i.e., Vacation1== Vacation2;,. If the two objects have identical numDays, numPeople and names lists, the function return true; otherwise, it returns falseThe '<<' operator that enables the direct output of FamilyVacation object as cout << myVacation;The '=' operator that assign a FamilyVacation object to another using deep copy

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 Programming Questions!