Question: Write a program for a hotel bill as follows. Room Choices Cost per night Standard room $ 1 2 5 Suite $ 4 0 0
Write a program for a hotel bill as follows.
Room
Choices
Cost per
night
Standard
room
$
Suite $
Cost
Single lunch $
Single dinner $
Do the following:
From the main method, write a call to a method named,
getRoomCost. No values are passed to this method. Within this
method, write coding where user can enter the number of
standard rooms taken and the number of nights stayed in the
hotel. Compute the total cost and return this value back into main
method and print it
Similar to step write a call to a method named, getSuiteCost.
Follow the exact procedure as in step to compute the total cost
of staying in a suite and return this value back into main method
and print it
From the main method, write a call to a method named,
getLunchCost, and no values are passed to this method. Within
this method, write coding where user can enter the total number
of lunches ordered number of lunches ordered has nothing to do
steps and Compute the total cost of lunches and return this
value back into main method and print it
Similar to step write a call to a method named, getDinnerCost.
Follow the exact procedure as in step to compute the total cost
of dinners and return this value back into main method and print
it
From within the main method, add values corresponding to steps
to and compute the total cost before taxes. Pass this value to
a method named getTaxes. Taxes are Return the value of
taxes back into main method and print it
From the main method, write a call to a method named, getTips.
From the main method, pass the total lunch and total dinner costs
to this method. Tips are of the combined lunch and dinner
costs. Pass this value back into the main method and print it
From within the main method, add taxes and tips to the total
before taxes to compute the total bill. Print this value.
User Input:
Enter the number of standard rooms taken
Enter the number of nights stayed in standard rooms
Enter the number of suites taken
Enter the number of nights stayed in suites
Enter the total number of lunches ordered
Enter the total number of dinners ordered
Expected Output:
Total cost of standard rooms xx $
Total cost of suites xx $
Total cost of lunches x $
Total cost of dinners x $
Grand Total before taxes
$
Taxes $
Tips $
Grand Total bill $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
