Question: You are required to write a JAVA program based on the problem description given. Read the problem description and examine the sample of output; then
Write a default constructor, and another overloaded constructor to initiate the value of noOfBed, price and roomType prompt from the user. I 11 Write set and get methods for all instance variables. Il calculate Price will calculate the total price of room booked Example, if a user book 2 Single rooms, total price 150 2 - 300 Table 1 no Bed 2 4 price 150 300 500 800 Room Type Single Double Family suite 6 1/ Display the information of room booked using get methods. The main Write the HotelSystemApp code that allow booking rooms of four different types shown in Table 1. Use set methods to assign values, calculate the total price of rooms booked and display the information as the sample given below. Sample of output: Welcome to Hotel System Enter no of beds: 1 How many room? 1 1 Single Room, the total price is 150.00 Would you like to book another room (1:Yes, :No)? 1 Enter no of beds: 4 How many room? 2 2 Family Room, the total price is 1000.00 Would you like to book another room (1:Yes, :No)? 1 Enter no of beds : 6 How many room? 1 1 Suite, the total price is 900.00 Would you like to book another room (1:Yes, 0:No)? O Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
