CS 206 - Introduction to Data Structures

Homework 3

ArrayList - Zipcode lookup

Due October 1, prior to 11:59pm

Read the program design principles and code formatting standards carefully. You are expected to adhere to all stated standards.

Overview

This project uses ArrayList (use java.util.ArrayList) and object-oriented design with inheritance. The general idea is that there are two data files, both of which contain information about US zip codes. You need to read that data into appropriately designed classes, store those classes in a single ArrayList then answer questions using the stored information. (More on that below.)

Data

There are two data files. Each is described in a section below.

ziplocs.csv

ziplocs.csv contains a header line at the top with column names. Thereafter, the lines contain 12 comma-separated fields that look like this:
      "00705","STANDARD","AIBONITO","PR","PRIMARY",18.14,-66.26,"NA-US-PR-AIBONITO","false",,,
      "09005","MILITARY","APO","AE","PRIMARY",,,"EU-DE-WEISBADEN AAF OMDC","false",,,

We will only use three of these fields,

Some lines are missing the longitude and latitude (like the second sample line), but all lines have the correct number of commas (11).

uszipcodes.csv

uszipcodes.csv also contains a header line. Thereafter, the lines contain 12 comma-separated fields that look like this:
      49079,Paw Paw,MI,13606,6764,6842,
      00636,Rosario,PR,,,,    
From this file we will use 4 fields As above, some lines are missing population data, but all have the correct number of commas and all have zip, city name and state.

Requirements

Electronic Submissions

Your program will be graded based on how it runs on the department’s Linux server, not how it runs on your computer.

1. README:

The usual plain text file README
2. Source files:

3. Data files used:
uszipcodes.csv, ziplocs.csv
DO NOT INCLUDE:
Data files that are read from the class site.

The following steps for submission assume you are using Eclipse, and that you created a project named Assignment3 in the directory /home/YOU/cs206/

  1. Put the README file into the project directory (/home/YOU/cs206/Assignment3)
  2. Go to the directory /home/YOU/cs206/Assignment3/
  3. Enter submit -c 206 -p 3 -d Assignment3
For more on using the submit script click here