Question: write destructor and copy constructor for Hotel class in c++ pls struct Room { int size; int num_beds ; }; class Hotel { public: Hotel(string
write destructor and copy constructor for Hotel class in c++ pls

struct Room \{ int size; int num_beds ; \}; class Hotel \{ public: Hotel(string hotel_name, vector v) \{ name = hotel_name; num_rooms =v.size(); rooms = new Room[num_rooms]; for (int i=0; i i++ ) {. rooms [i].size =v[i].size; rooms [i].num_beds =v[i]. num_beds; \} \} void display() \{ cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
