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: .

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

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!