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 numPeople names nullptrAn overloaded constructor that takes three parameters as input in the order of int days, int people, string namesA 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 ; both newVacation and oldVacation are objects of FamilyVacation This calculation will return a new vacation with more days ie add to numDays memberA operator that allows the calculation of newVacation Vacation Vacation; which will add the numDays of the Vacation and Vacation and merge the names lists of the two objectsA operator that compares two FamilyVacation objects, ie Vacation Vacation; 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
