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

Learning Plan 5 5.2 Lab 2

# 5.2 Lab 2

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

### Student

- Name:
- Section:
- Email:

### Part 1 Lab Steps

- Open this file in Firefox and Microsoft Visual Studio.
- Add your name, section, and email
- Open the file "/Learning Plan 5/5.1lab2.js" in Microsoft Visual Studio
- Locate the function named "lab52_2Part1()".
- Add code after the line: `// PART 1: YOUR CODE STARTS AFTER THIS LINE:` to complete the lab from the program statement.

### Part 1 Problem Statement

> Write a program that asks a user to enter five numbers. Each number that is entered that is greater than zero should be displayed on the page and added to a total variable. Numbers that are less than zero should be displayed, but not added to the total. Display the total after the loop has ended.

#### Part 1 Sample Output

    Entered number was : 1
    Entered number was : 2
    Entered number was : 3
    Entered number was : -6
    Entered number was : -2

    Total: 6

### 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 Lab Steps

1. Locate the function named "lab52_2Part2()".
2. Add code after the line: `// PART 2: YOUR CODE STARTS AFTER THIS LINE:` to complete the lab from the program statement.
3. Refer to this page for the details about the Employee Payroll Records Set.

### Part 2 Problem Statement

> Write a program that accesses the Employee Payroll Records Set. The program will determine the average, maximum, and minimum Hourly Wage for the employees. Output the result as shown in the sample output.

#### Part 2 Sample Output

    Average Hourly Wage: 22.94
    Maximum Hourly Wage: 30
    Minimum Hourly Wage: 15

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

### 5.2 Assignment 2

- 5.2 Assignment 2