Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a file called zipcodes.txt that contains the zip code, township for that zip code and the state for that zipcode. file format: 08001

I have a file called zipcodes.txt that contains the zip code, township for that zip code and the state for that zipcode. file format: 08001 Alloway salemcounty 08002 cherry hill and so on(each string is one their own line such as Alloway being under it's zipcode....I think it's like 4000 lines maybe idk the size. The program has to has to have 3 classes and each class has to have their own file. The 3 classes are zipcodes, ziplist, zipcodesproject(main class). I have to load the data into an array, ask the user for a zip code, then either display the data for that zip code, or says the zip code was not found. The main method should simply call the other methods in the class to show that they work. The zipcodeslist should contain the array of zip code objects. zipcodes should contain the zipcodes, with the properties zipcode, town and state. Please I need a lot of help. thnx a bunch!!!!

Here's the info the project if you didn't get what I said, thnx:

The data file zipcodes.txt in the canvas files for Week 1 is a plain text file containing three pieces of information for several zip codes around Philadelphia:

the zip code

the township for that zip code

the state for that zip code

each item is on separate line in the file, such as

08001

Alloway

Salem County

08002

Cherry Hill

Camden County

08003

Cherry Hill

Camden County

08004

Atco

Camden County

08005

Barnegat

Ocean County

08006

and so on

Your task, after reading Appendix B Software Flexibility, is to create a software package as a NetBeans project that contains three classes:

an executable class for the project itself

a class of zip codes, with the properties zipcode, town, and state

a class for list of zipcode objects, which uses an array to store the zip codes.

The zip code and list classes should contain appropriate properties and methods to work with those objects.

Your projects class (with the same name as the package) should contain a main method, and methods to test your other classes as follows:

load the data from the data file into the array of zip codes.

print the list of zip codes -- including each zip codes, town, and state -- with the data for each zip code on a separate line.

a method that asks the user for zip code, then either displays the data for that zip code, or says the zip code was not found in the list.

The main method should simply call the other methods in the class to show that they work. Their should be no array in the project class or the zipcode class. The zipcode list class should contain the array of zip code objects.

Each class should be in its own file, within the same package in the same NetBeans project. The end of Appendix B addresses how to do this.

In the NetBeans project cityProject, you can see that each of the classes City, Vertex, Edge, etc., is in its own file within the project. This is included as an example in the files for Week 1. The project is beyond the scope of this assignment, but it does show you how Java projects can contain separate classes in separate files within the same project.

Please ask me if you have any questions or run into any trouble.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions