fundamental requirements of programs

timer Asked: Jan 4th, 2019
account_balance_wallet $35

Question description

One of the fundamental requirements of programs is to use data stored in permanent storage such as a hard disk file. Programs must be able to read and write this type of data and use appropriate data structures within the program to work with the data. In this assignment, you will write a program to load and manipulate a data file. The data file can be downloaded from the following link: Unit 4 Sample Data.

The file should not be a comma delimited file and should have the following record structure:

  • FirstName – Character – Size (12)
  • LastName – Character – Size (16)
  • Company – Character – Size (32)
  • Address – Character – Size (32)
  • City – Character – Size (24)
  • County – Character – Size (24)
  • State – Character – Size (2)
  • ZIP – Number – Size (5)
  • Phone – Character – Size (12)
  • Fax – Character – Size (12)
  • Email – Character – Size (32)
  • Web – Character – Size (42)

Step 1: For this assignment, you will write a complete Java console program to load the data file into an ArrayList data structure. Store each line from the file as a separate record in the ArrayList. To read the file, you should use a FileReader wrapped in a BufferedReader. If you create a Java class to contain each record, you will be able to create an object for each record and store the object in the ArrayList. Sorting the data can then be done using another wrapper class that contains the ArrayList and has methods for sorting and output of the data.

Step 2: After the file is loaded into the ArrayList, sort the data in ascending order based on the LastName field, and display the following fields:

  • First name
  • Last name
  • Company

Step 3: Next, sort the data in descending order based on the ZIP field, and display the following fields:

  • First name
  • Last name
  • Company
  • ZIP

Step 4: Display all of the records (and all of the fields) for everyone that is in the state "NY."

Step 5: The submission should be a single MS Word document with the program source code for the solution and screenshots of the output for the following list:

  1. Sorted data based on last name
  2. Sorted data based on ZIP
  3. Everyone in the state of NY

Please submit your assignment.

FirstName Eddie Chris Brooklynn Zion Ruby Bob Susan Vicky Lee Mary Jennifer Michelle Conner Colin Sheila Rosy David Willa Tiana Douglas Colt Stephen Catherine Calvin LastName Company Address City County State Vazquez Osweep Industries 14316 Hancock Richdale Circle Anchorage AK Robinson Finch Products 2133 N West Deerford Street Maricopa AZ Taylor Prism Globe48 IncE 13th Blvd Corway HillsNew York NY Miller Switch Pen 196 Company State Ave LawnworthMiddlesex NJ Flynn Snap Sun Services 3175 W Carrier Meadowburg Lane Honolulu HI Lewis Code Planet22652 Properties E Easton East St Fortview Will Lake IL Hernandez Light Table Bearings 9630 S City Kingstown Ave Reservoir Maricopa AZ Perez Lime Cake Records 7421 Jefferson Hearthbridge Pkwy Lehigh PA Hill Round Rock884 Engineers W Glendale Old Lindenfield Rd Los AngelesCA Grove Edwards Simple Byte6122 Technologies E BlueUpper Vine Prkwy Caldbrook Orange FL Davis Quicker Span 2598 Reviews Oak RdEast Maymeadow Shelby TN Martin Diamond Post 329Surveys Brush Cir Belcove NW Marion OR Lee Cash Pad Loans 116 Rail Way Adamsfield Mahoning OH Brown Easy Rug Cleaners 1612 W BayBridgeing Rd Orange CA Garcia Clear Blue Window 152 Broad Cleaning Ln Portcroft Cove Bexar TX King Shots Manufacturing 6930 Bass Stream Old Clarksfax Blvd Hennepin MN Baker Box State Trading 6728 Timbuck Corporation Pittsfort St Mahoning OH Roberts Low Sky Seating 1519Company Hawk Coleford Ave El Paso TX Williams Country Boxes 24969 TibbsChristiansmount Circle Los AngelesCA Ingram Quicker Cupcakes 3450 Lion Rd BrunsbeachNueces TX Lopez Case Electronics 370 Stock Ave Fort Hansville Middlesex NJ Phillips Brown Technologies 1095 SW 2nd New Rd Hamford Vanderburgh IN Smith Side Sauce Spices 140 E 4th Street Hempline Island New York NY Morris Zippy Sandwiches 79 W Broadway Bayway Ave Franklin OH ZIP 99515 85004 10001 8861 96819 60410 85051 18087 91790 32809 38112 97302 44512 92802 78205 55428 44406 79925 91355 78408 8861 47713 10018 43215 Phone 907-456-8510 602-141-3716 212-778-6886 732-331-5270 808-947-7855 815-356-3760 602-842-3864 610-284-7632 626-849-7849 407-746-3200 901-438-6447 503-260-7108 330-869-4252 714-661-3939 210-340-4128 763-426-3083 330-644-7457 915-660-1619 661-368-4194 361-773-7322 732-553-9625 812-310-3693 212-830-5063 614-114-7890 Fax Email Web Convert to Pig Latin 907-456-2326 The Customer's Name is Eddie Vazquez and they work for Osweep Industries 602-141-2898 The Customer's Name is Chris Robinson and they work for Finch Products 212-778-6875 The Customer's Name is Brooklynn Taylor and they work for Prism Globe Inc 732-331-4107 The Customer's Name is Zion Miller and they work for Switch Pen Company 808-947-7119 The Customer's Name is Ruby Flynn and they work for Snap Sun Services 815-356-1330 The Customer's Name is Bob Lewis and they work for Code Planet Properties 602-842-4662 The Customer's Name is Susan Hernandez and they work for Light Table Bearings 610-284-5884 The Customer's Name is Vicky Perez and they work for Lime Cake Records 626-849-2614 The Customer's Name is Lee Hill and they work for Round Rock Engineers 407-746-1395 The Customer's Name is Mary Edwards and they work for Simple Byte Technologies 901-438-4022 The Customer's Name is Jennifer Davis and they work for Quicker Span Reviews 503-260-7000 The Customer's Name is Michelle Martin and they work for Diamond Post Surveys 330-869-4647 The Customer's Name is Conner Lee and they work for Cash Pad Loans 714-661-2748 The Customer's Name is Colin Brown and they work for Easy Rug Cleaners 210-340-1086 The Customer's Name is Sheila Garcia and they work for Clear Blue Window Cleaning 763-426-2774 The Customer's Name is Rosy King and they work for Shots Manufacturing 330-644-9322 The Customer's Name is David Baker and they work for Box State Trading Corporation 915-660-4618 The Customer's Name is Willa Roberts and they work for Low Sky Seating Company 661-368-1035 The Customer's Name is Tiana Williams and they work for Country Boxes 361-773-2874 The Customer's Name is Douglas Ingram and they work for Quicker Cupcakes 732-553-2886 The Customer's Name is Colt Lopez and they work for Case Electronics 812-310-6514 The Customer's Name is Stephen Phillips and they work for Brown Technologies 212-830-8652 The Customer's Name is Catherine Smith and they work for Side Sauce Spices 614-114-5010 The Customer's Name is Calvin Morris and they work for Zippy Sandwiches for Light Table Bearings r Simple Byte Technologies or Diamond Post Surveys Clear Blue Window Cleaning ox State Trading Corporation Low Sky Seating Company

Tutor Answer

School: Boston College

Check it please.

Main Program

public class Driver {
* Utility function to print
static void print(String string) {

public static void main(String[] args) {
ArrayList records = new ArrayList();
String line;
try {
FileReader fileReader = new
FileReader("itco321_u4ip_sample_data.csv"); //2
BufferedReader bufferedReader = new BufferedReader(fileReader); //3
line = bufferedReader.readLine();
while ((line = bufferedReader.readLine()) != null) {
String[] data = line.split(",");
Record record = new Record();

flag Report DMCA

10/10 would recommend. Responsive and helpful.

Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors