Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some help with this project problem statement. I want it to be like the sample output below, above are the instructions and blow

I need some help with this project problem statement. I want it to be like the sample output below, above are the instructions and blow that is my output. It also needs to be basic javascript aka docment.write, else if, ETC.image text in transcribedimage text in transcribed

Problem Statement Write a program that calculates the price of a hotel room based on the following three factors. 1. How many will be in one room: 1-2, 3-4, or 5-6? No more than six are allowed in a room. 2. Are they members of AAA? Yes (y) or No (n) 3. What payment method do they plan to use? Check (ck) or Credit Card (cc) The program should prompt the user for all the inputs, check for invalid input, perform the calculations, and output the total cost per night. It is suggested to use at least some nested if else structures to calculate the cost. Use the .toFixed(2) method to display the total cost per night rounded to two decimal places. The rate is calculated as follows: Basic Room Rate 1-2 people = $50ight 3-4 people = $60ight 5-6 people = $70ight Discount for AAA members (off of the basic room rate) 1-2 people = 15% 3-4 people = 10% 5-6 people = 5% Payment method processing charge If they plan to pay with a check (ck), there is no additional processing charge. If they plan to pay with a credit card (cc), there is an additional 4% cost more per night after all other calculations are performed. . Error messages should occur for the following: Guest number is less than 1 or greater than 6 Guest number input is not numeric AAA membership is not a valid input (not 'y' or 'n') Users enter nothing for AAA membership Payment method is not a valid input (not 'ck or 'cc) Users enter nothing for a payment Sample Output Total cost per night is $50.00 Your Output

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

Step: 3

blur-text-image

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago