Question: Create an encapsulated class Hotel having the following data members: . OwnerOfHotel (Person) . AddressOfHotel (Address) 1. Rooms[10] (Booleanll) CustomerName[10] (StringlI) . //stores names of

Create an encapsulated class Hotel having the following data members: . OwnerOfHotel (Person) . AddressOfHotel (Address) 1. Rooms[10] (Booleanll) CustomerName[10] (StringlI) . //stores names of customers who have booked a room. Methods . Two Constructors (default, Argument) . Set and Get Methods for all Data Members .Display) e BookARopm(?) . TotalBookedRooms(?) //must display all information of data members. //must update Roomsl and CustomerNamell //returns the number of total rooms booked. CompareRooms(??) // Compare two Hotels and returns the Hotel with more booked rooms .CompareAddress(??) // Compare two Hotels and return true if address of two Hotels is same Runner . Create Two Objects; One with Empty constructor and other with arguments Constructor . Use Set Method to set the values of first Object. . Call Display for Both Objects . Book rooms in both Objects . Call compare methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
