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

Learning Plan 5 5.3 Project - Part 4

# 5.3 Project - Part 4

#### File: /Learning Plan 5/5.3projectPart4.html

### Student

- Name:
- Section:
- Email:

### Specifications

- Open this file in Firefox and Microsoft Visual Studio.
- Add your name, section, and email.
- Open the file `jsFile/5.3projectPart4.js` in Microsoft Visual Studio.
- Your JavaScript code must go in the `jsFile/5.3projectPart4.js` file.
- Read the following problem statement and complete all steps in the development process.

### Problem Statement

> Write a program that determines how many males and females live in each of the Zip Code areas in the Student Enrollment Records Set. Output the zip code, the total number of males, and the total number of females for each zip code. At the end of the report display a total of males and females.

> There are 5 zip codes in the record set. The zip codes are : 53711, 53712, 53713, 53714, 53716. These zipcode values are self-evident as zipcodes, and may be used as literals within the program--they are an exception to the general course standard of avoiding the use of literals down in the main section of a program. As each record is read, interrogate the gender code field and the zip code field, and then increment the appropriate counter variables for that gender and for that gender and zipcode combination.

> There must be at least five (5) functions in this program for full credit. The existing function named, project53Part4() is the first one. You must create at least four (4) new functions for the program. (These new functions must, of course, be located in the js library file associated with this program.)

- Use the Student Enrollment Records for the source of the records.

### The Program Planning Lists

- In the following pre tag, before doing any programming, write the three planning lists.

    The List of Input Variables:

    The List of Output Variables:

    The Process Checklist:

### 5. JavaScript Output

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

    53711: Males: 5 Females: 2
    53712: Males: 9 Females: 9
    53713: Males: 11 Females: 3
    53714: Males: 4 Females: 6
    53716: Males: 1 Females: 0

    Total Males: 30
    Total Females: 20

- 5.3 Project - Part 4 Output: