Question: HELP!!! Please make the whole program with all the requirements and copy and paste the whole code in the answer box! Download the text file
HELP!!! Please make the whole program with all the requirements and copy and paste the whole code in the answer box! Download the text file from your Canvas course site. The file contains record information from
records with the following field format:
first name,middle name,last name,city name
The data was badly stored, using the Comma Separated Value CSV format, in such a way that
the fields do not properly align with that record format. All of the information is there but the
record boundaries are misaligned. Some, all, or more than a single proper record may exist in
as a single record in this file.
Example:
Lars
Jame,Thompson,Clifton,Jenifer
Mae,Jones, Henry
Rick,Luke,Simons
Lincoln,Tim,Lee,Huag,Boston
Sally,Joe, Patton,New York
Howard,Richard,Larson,Scramento,Samantha,Austin,Henry,St George,George
Henry,Marcus,New Town
Your task is to write a program that will read the data from bad files and write new files with
the data correctly stored in a new CSV format and in alphabetical order by last name, first
name, middle name. The new format is:
last name,first name,middle name,city name
The correctly written final file:
Henry,Samantha,Austin,St George
Huag, Tim,Lee,Boston
Jones,Jenifer,Mae,Henry
Larson,Howard,Richard,Scramento
Marcus,George,Henry,New Town
Patton,Sally,Joe,New York
Simons,Rick,Luke,Lincoln
Thompson,Lars,Jame,Clifton Note that your program should handle any file that contains any number of lines of data, as
long as a
Download the text file from your Canvas course site. The file contains record information from
records with the following field format:
first name,middle name,last name,city name
The data was badly stored, using the Comma Separated Value CSV format, in such a way that
the fields do not properly align with that record format. All of the information is there but the
record boundaries are misaligned. Some, all, or more than a single proper record may exist in
as a single record in this file.
Example:
Lars
Jame,Thompson,Clifton,Jenifer
Mae,Jones,Henry
Rick,Luke,Simons
Lincoln,Tim,Lee,Huag,Boston
Sally,Joe,Patton,New York
Howard,Richard,Larson,Scramento,Samantha,Austin,Henry,St George,George
Henry,Marcus,New Town
Your task is to write a program that will read the data from bad files and write new files with
the data correctly stored in a new CSV format and in alphabetical order by last name, first
name, middle name. The new format is:
last name,first name,middle name,city name
The correctly written final file:
Henry,Samantha,Austin,St George
Huag,Tim,Lee,Boston
Jones,Jenifer,Mae,Henry
Larson,Howard,Richard,Scramento
Marcus,George,Henry,New Town
Patton,Sally,Joe,New York
Simons,Rick,Luke,Lincoln
Thompson,Lars,Jame,Clifton
Note that your program should handle any file that contains any number of lines of data, as
long as all of the information is available for each record.
If you use the Scanner class to read your files field data you should set the Scanner objects
delimiter using the regular expression
r This will allow it to properly read the EndOf
Record markers for each line in the file.
To easily sort the records, I recommend storing each records data into a class object that holds
the first name,middle name,last name,city name fields. You can then write a compareTo
method that will allow you to sort the objects.
After you have created this program submit it in its entirety, as an Eclipse exported zip project.
The project must all classes used to solve the problem and also include the input file and the
newly created output file.
HERE IS THE CSV TEXT:
Fae
Belle,Marshal,Meca,Elisheva,Ariana,Hamilton,Dale,Sue,Guinevere,Smith
Plains
Frederick,Dexter
Taylor,Portland,Janice,Elisheva,Baxter,Mountain View
Charlene,Thora,Washington,Riyadh,Reed,Lars,Hoover,Berlin,Faith,Clare,Hampt
on
Woods
Kenneth,Lars,Puller,Valley,Sara,Isabelle,King,London,Percival,Abbot,Newton
Trinidad,Henry,Nate,Sheperd,George,Athena,Ruth,Young,Rockland,Elisabeth,E
lisheba,Henderson,Mesada,Belle,Lina,Potter,Danville,Kenneth,Drew
Draper,Seattle,Margret,Delila,Fender,Harvard,Levi,Bradly,Ash,Honolulu,Caro
lynHellen,Schuller,Resort,Julie,Holly
Ohm,Boston,Renae,Nancy,Poe,St
Petersburg,Darcey,Mary,Clemmits,Nowhere,Faith,Kay,Holiday,Buggtown
Margret,Belle,Jones,Woods,Heath,Gary,Plank,Resort,Amos,Danny,Erp,Freetown,
Lina,Hellen,Smith,Seoul,Percy,Lars,Schuller
Washington,Drew,Abraham
Maddison,Bejing,Elisabeth,Gwen,Fender,Huntsville,Millie,Charlotte,Clemmits
Hooverville,Kevin,Ricky,Davis,Hooverville,Ellen,Millie,Adams,Mesada,Rita,
Zelda,Miller,St
Petersburg,Jane,Jane,Fender,Nome,Dexter,Enoch,Holiday,Rockland,Grace,Milli
eJackson,Lincoln,Jane,Genevie,Hanks,Seattle,James,Nathan,Young,Lincoln,Ge
orge,Greg
Einstein,Dixon,Kay,Maria,Williams,Troy,Jack,Danny,Plank,Freetown
Catherine,Ana,Holiday,Trinidad,Grace,Elisabeth,Smith,Pleasant,Erma,Elishev
aPuller,Plains,Marshal,Marshal,Draper,Madison,Aloysius
Barny,Baxter,Pleasant,Wendy,Renae,Lincoln,Danville
Rita,Aleatha,Adams,London,Janice
Genevie,Fender,Dale
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
