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

Learning Plan 5 5.2 Assignment 3

# 5.2 Assignment 3

#### File: /Learning Plan 5/5.2assignment3.html

### Student

- Name:
- Section:
- Email:

## Part 1

1. Open this file in Firefox and Microsoft Visual Studio.
2. Add your name, section, and email
3. Open the file "/Learning Plan 5/jsFiles/5.2assignment3.js"
4. Locate the function named "assignment52_3Part1()".
5. Add code after the line: `// PART 1: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.
6. Refer to this page for the details about the Student Exam Records Set.

### Part 1 Problem Statement

> Write a program that accesses the Student Exam Records Set. Create a report for the instructor that calculates how many students received each grade based on the following table.

Exam Score | Assigned Grade
90 and above | A
80 to less than 90 | B
70 to less than 80 | C
60 to less than 70 | D
below 60 | F

> Also calculate the average grade for the class. Output the report as in the sample output.

- Sample Part 1 Output:

    Grade		Count
    A		4
    B		6
    C		5
    D		5
    F		3

    Average Score: 74.90434782608696

### Part 1 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:

### Part 1 Test Plan

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

### Your Part 1 Output:

## Part 2

1. Locate the function named "assignment52_3Part2()".
2. Add code after the line: `// PART 2: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.

### Part 2 Problem Statement

> Write a guessing game program. Ask a user to guess a number between 1 and 100. If a guess is not a number then alert the user. If the number is too big then alert the user and output the guess to the page. If the number is too small then alert the user and output the guess to the page. When the user guesses the right number then alert the user that they guessed right and output the final guess to the page.

> The correct value that is being guessed should be calculated with the following code:

- Sample Part 2 Output:

    small guess: 50
    small guess: 70
    large guess: 80
    large guess: 78

    Correct guess: 75

### Part 2 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:

### Part 2 Test Plan

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

### Your Part 2 Output:

### Submitting your work

- Zip and submit this assignment 5.2 Assignment 3
- Don't forget to also zip and submit your JavaScript file 5.2assignment3.js.
- Make sure that both files are zipped and submitted together.