Create a class named HotelRoom that includes an integer field for the room number and a double field for the nightly rental rate. The constructor of this class requires an integer argument...


Create a class named HotelRoom that includes an integer field for the room number and a double field for the nightly rental rate. The constructor of this class requires an integer argument representing the room number and the constructor sets the room rate based on the room number; rooms numbered 299 and below are $69.95 per night, and others are $89.95 per night. Create an extended class named Suite whose constructor requires a room number and adds a $40 surcharge to the regular hotel room rate, which again is based on the room number. Write an application named UseHotelRoom that creates an object of each class, accept room number from user, demonstrate that all the methods work correctly and display the details. Save the files as UseHotelRoom.java.

Sep 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here