Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 study the program design given. Write a complete program with necessary useful comment for good documentation. Compile and execute the pro
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 study the program design given. Write a complete program with necessary useful comment for good documentation. Compile and execute the program.
gram. Write a program that defines Room. Room has a number of beds and a price
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Is how things are said consistent with what is said?

Answered: 1 week ago

Question

True or fasle.

Answered: 1 week ago