Question: Java for Eclipse Project: The purpose of this project is to gain an understanding of using a hash table, sorting and basic report generation techniques.

Java for Eclipse Project: The purpose of this project is to gain an understanding of using a hash table, sorting and basic report generation techniques.

You will be provided an input file with each line containing a persons first name, last name, and zip code separated by commas.

1. Create a hash map.

2. Read each line from the input file.

3. Parse the data into a Person class instance containing firstName, lastName, zipCode. If the parsing is not correct list that line as in error. Hint: there are standard Java library methods to help with the parsing.

4. Add the Person to the hash map. If a person by the same first and last name already exists, display an error and ignore this entry.

5. Sort the entries in the hash map by zip code, last name, and then first name. Hint: a HashMap does not support sorting. You will need to make a copy of all entries in the HashMap into another data structure.

6. Print a report header.

7. Print out the results sorted by zip code with a count of the numbers in each zip code.

8. Print a report summary.

A few sample lines in the input file might be:

Alan,Fontanella,55101

Bryan,Hills,40218

Andrew,Luck,55101

Joe,Smith,55102

Bill,Gates

Andrew,Luck,55102

For this input file, the generated report should look like:

Format error on line 5: Bill,Gates

Entry on line 6 already encountered: Andrew,Luck,55102

Company Zip Code Distribution April 6, 2018 (Example Header)

Zip Code: 40218

Hills, Bryan

Zip Code 40218: 1 resident

Zip Code: 55101

Fontanella, Alan

Luck, Andrew

Zip Code 55101: 2 residents

Zip Code: 55102

Smith, Joe

Zip Code 55102: 1 resident

Report Summary:

2 Records in error

3 Zip Codes encountered

4 Records Processed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!