Java along with a UML class diagram with the appropriate relationships *)A hotel has a name and several rooms. When a hotel is built, the name and the number of rooms should be provided. In some cases, the maximum capacity of the rooms is also provided. If there is no maximum capacity set, each room can accommodate at most 6 guests. *)The rooms are then automatically created and added to the hotel, numbered from 1, 2, 3, and so on, representing the room number. Once the room number is assigned to the created room, this information cannot be edited anymore. *)The hotel can accept guests into a given room number. Each guest has a name and nationality. If the capacity is full or an invalid room number is provided, the guest will not be added and this method returns false. Otherwise, this method returns true. *)The hotel also has a method to return the guests in a given room number. If an invalid room number is provided, the method will return null
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
I need help in coding appropriate classes based on the following information in Java along with a UML class diagram with the appropriate relationships
*)A hotel has a name and several rooms. When a hotel is built, the name and the number of rooms should be provided. In some cases, the maximum capacity of the rooms is also provided. If there is no maximum capacity set, each room can accommodate at most 6 guests.
*)The rooms are then automatically created and added to the hotel, numbered from 1, 2, 3, and so on, representing the room number. Once the room number is assigned to the created room, this information cannot be edited anymore.
*)The hotel can accept guests into a given room number. Each guest has a name and nationality. If the capacity is full or an invalid room number is provided, the guest will not be added and this method returns false. Otherwise, this method returns true.
*)The hotel also has a method to return the guests in a given room number. If an invalid room number is provided, the method will return null.
Step by step
Solved in 5 steps with 5 images