Fill This Form To Receive Instant Help
Homework answers / question archive / Java 2 Final Project Part 1 – Hotel Create an abstract HotelRoom class that has a capacity, hasMicroFridge, averageNightlyPrice, and isVacant fields
Java 2 Final Project
Create an abstract HotelRoom class that has a capacity, hasMicroFridge, averageNightlyPrice, and isVacant fields.
Create a DoubleHotelRooms that extends the HotelRoom the capacity should always be 4. Create a KingHotelRooms that extends the HotelRoom the capacity should always be 3. Create a DoubleSuiteHotelRooms that extends the DoubleHotelRooms the room always has a mircofridge. Create a KingSuiteHotelRooms that extends the KingHotelRooms the room always has a mircofridge.
Create a Hotel class with an ArrayList of HotelRooms. Create a no-arg constructor that will initialize in the ArrayList with 5 rooms of each type. It will set the averageNightlyPrice for a DoubleHotelRooms to $95.50, KingHotelRooms to $96.50, DoubleSuiteHotelRooms to $105.36, and KingSuiteHotelRooms to $104.52.
Create getters, setters, equals, and toStrings for all classes.
Create a driver class that will allow the user to book a room of their choosing for x-number of nights and the total for a stay.
Add to the Part1 of the project the following exceptions: NoVacancyException and OverCapacityException. The NoVacancyException should be thrown when the hotel has no rooms left. The OverCapacityException should be thrown when a guest’s party is too large for the room.
Add the following classes: Guest, Reservation. The Guest class should have the following fields: firstName, lastName, address, numberChildrenInParty, and numberAdultsInParty. The Reservation class should have a totalCostForTheStay, a guest and a hotel room.
Add the following interfaces: BookHotelRoom and ReservationStatus. The BookHotelRoom interface should generate a reservation. (Hint: a Hotel should be able to book a hotel room). The ReservationStatus interface should have a checkIn, and checkOut method. The checkIn method should be called after a Reservation has been placed and will cause the room to be occupied. The checkOut method should be called when the user is ready to checkout of a room. Both methods should accept a Reservation
Create getters, setters, equals, and toStrings for all classes.
Create a driver class that will be menu driven with options to: create a Reservation with a room of their choosing for x-number of nights and print the total for a stay, see all current Reservations for the Hotel, checkout a guest from a Hotel room. The user should only be using Reservations to book different rooms at the hotel. The programmer should handle any room overcapacity or no vacancies with feedback to the user.
Use the classes implemented in Parts 1 and 2 to create a GUI application to accommodate a front desk agent checking in and out guests. Upon startup the application should search for a “hotelRooms.dat”, it should populate an instance of the Hotel Class. (Hint: if the file doesn’t exist create a new instance) Upon shutdown the application should write the current instance of the Hotel Class to a file named “hotelRooms.dat”. The programmer should handle any exceptions.
Please download the answer files using this link
https://drive.google.com/file/d/1T4dhJTIvgnTFGVbq9MwM5y9MtWBV8Lzm/view?usp=sharing