Write a program that will read the data from the csv file


Write a program that will read the data from the CSV file into an ArrayList of State objects where each State object stores information about all County objects for that state; note for this program States, districts, and territories(eg D.C.) will just be considered states. The CSV file contains aggregate information for all states and counties of each state. The CSV file I have uploaded is needed to run this program, the CSV file cannot be altered in any way form or fashion, it must be used as is. This program must be written using multiple classes, e.g. State class and County Class. this program doesn't require any mutators, for the State class and County class, since the program will read from the CSV file, but it will need constructors. You need to aim for methods that are about 25 lines of code long. This will require the designing of solutions where you're breaking down a problem into smaller subproblems. Each method should have a single well-defined purpose that is documented in its JavaDoc with pre and post conditions.25 lines of code should easily fit within the height of a window (typical heights). So If you need to scroll through the code of a method so that you can see all of it, then it's too long.Process the data provided and aggregate it by writing the following to an output file
1) For each state, first confirm the aggregate information for each state in the data file with the individual county information. For the state of Alabama, the data file shows that there were 2,069,212 tax returns. You need the add all county records to verify that this value is the sum of all tax returns for every county. Similarly with other values.
2) For each state, display aggregate information for that state, including: the total number of counties in the state, the total number of tax returns, total number of exemptions, total adjusted gross income, etc. Also for each state, display the average number of exemptions and the averages for each of the monetary amounts; e.g.: average AGI, average income from wages and salaries, etc.

3) Find the County with the fewest number of total tax returns. Display the county's name, the state it is in, the total number of tax returns, AGI, and wages and income (this is the county with the lowest in the country, not in a specific state).
4)Find the County with the largest AGI. Display similar information as above for the county with the fewest tax returns.

When the program is executed by a user, you need to display information about your program (in particular its purpose) and instructions on what is expected from the user.
Prompt the user for the name of the data file containing the data and for the name of the output file that will contain the aggregated information.
Use Java interfaces that will create callbacks to find the county with the smallest number of total tax returns and the county with the largest AGI.
Recover from the following Java I/O exceptions: FileNotFoundException, BadDataException. To recover from a FileNotFoundException, as the user to enter the name of the file again but give the user only 3 attempts. After the third unsuccessful attempt, the program should terminate normally. To recover from a BadDataException, you should skip the current county (omit it from your collection) and resume with the next county. Any other I/O exceptions should be reported to the user.
Heres some high-level Pseudo-Code
Given a line of data, determine if it represents a state or county
if (it represents state data)
create a new State object to represent it and the upcoming data for its counties
add it to the collection of States
otherwise (it represents county data)
create a new County object to represent it
Associate the County object with the most recently created State object, 
Do this by invoking a mutator on the State object to add the County to its collection 

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program that will read the data from the csv file
Reference No:- TGS0125401

Expected delivery within 24 Hours