Northcentral Technical College Introduction To Programming
10-152-310
Introduction to Programming with JavaScript NTC 10-152-310

Learning Plan 4 4.3 Project - Part 3

# Project 3 - Part 3

#### File: /Learning Plan 4/4.3projectPart3.html

### Student

- Name:
- Section:
- Email:

### Specifications

- Open this file in Firefox and Microsoft Visual Studio
- Add your name, section, and email

### Problem Statement

> Write a program that calculates the price of a hotel room based on three factors. First, how many will be in one room: 1-2, 3-4, or 5-6? No more than six are allowed in a room. Second, are the guests members of AAA? Third, do they want a room with a view? The rate is calculated as follows:

- Basic room rate is:
  - 1-2 people = $50/night
  - 3-4 people = $60/night
  - 5-6 people = $70/night
- There is a discount for AAA members off of the basic room rate per night:
  - 1-2 people = 15%
  - 3-4 people = 10%
  - 5-6 people = 5%
- A room with a view costs 10% more per night after all other calculations are performed.

> The program should prompt the user for all the inputs, 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.

### Program Planning Lists

- In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.

    The List of Input Variables:

    The List of Output Variables:

    The Process Checklist:

### The Test Plan

- In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

    Test Case 4:
        Inputs:

        Expected Results:

    Test Case 5:
        Inputs:

        Expected Results:

### JavaScript Program

> Write the JavaScript code based on everything you've done. Your code must follow the course coding standards. You should add good comments about the different parts of your solution.

### Sample Output:

    Total cost per night is $50.0

### 4.3 Project - Part 3 Output: