Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

Java 2 Final Project Part 1 – Hotel Create an abstract HotelRoom class that has a capacity, hasMicroFridge, averageNightlyPrice, and isVacant fields

Computer Science Jun 29, 2021

Java 2 Final Project

Part 1 – Hotel

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.

Part 2 – Hotel Revisited

 

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.

 

Part 3 – A Reservation Application

 

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.

Expert Solution

Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment