don’t do the extension questions
In this project, you will be writing a series of classes that work together to allow a hotel keep track of reservations, rates, and room assignments.
You will be using arrays of objects to create a variety of responses given certain data.
Reservation.java creates objects that hold two pieces of information in each reservation object created (name and rate). It has methods for creating the reservation object, get both of the instance variables separately, as well as printing relevant information in a formatted output.
Hotel.java stores reservation objects in an array, using the index of the array to represent the room number. This class has methods for taking reservations, and running reports to provide certain information.
HotelRunner.java provides sample data to test all your methods in Reservation and Hotel. HotelDisplay shows what the output of the sample data could look like.
Extension:
a. What would happen if you ran out of rooms? Decide what would need to change in your code and implement that change.
b. The Hotel class currently allows people to make reservations, but they don’t have the ability to cancel reservations, nor do they have the ability to check out.
Update your code so that:
i. You can cancel a reservation – this will make a room available.
ii. You can check out. Check out not only makes a room available, but will require that you are charged for the amount of time you spent at the hotel, so there are some deeper level changes
that you will need to make. Think about what needs to change in the structure of your classes in order for this check out process to work, and then code it.