Introduction: This assignment is to provide practice in using the Java I/O techniques discussed in the Module 10 video lectures and readings. Although the main focus of this assignment is Java I/O techniques, Java design and implementation techniques discussed in earlier modules should be incorporated in to this assignment. Problem: Supplied is a data file from the US Census which contains data from US school districts and reports statistics related to child poverty (http://www.census.gov/did/www/saipe/data/highlights/2013.html). It is desired to have a summary report which calculate basic statistics at the state level. Desired Implementation: Java 8 implementation to read the supplied text data and produce a report similar to the below:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Program in JAVA and please show output and comment the program

Introduction:

This assignment is to provide practice in using the Java I/O techniques discussed in the Module 10 video lectures and readings. Although the main focus of this assignment is Java I/O techniques, Java design and implementation techniques discussed in earlier modules should be incorporated in to this assignment.

Problem:

Supplied is a data file from the US Census which contains data from US school districts and reports statistics related to child poverty (http://www.census.gov/did/www/saipe/data/highlights/2013.html). It is desired to have a summary report which calculate basic statistics at the state level.

Desired Implementation:
Java 8 implementation to read the supplied text data and produce a report similar to the below:

 

 

 

 

 

 

There should be two separate "programs" (two separate .java files each with a main method), one to read the text data file and write a reformatted file to be read by the second program which will create the report to standard out. Note before the report is displayed, a single line with "File: " then the path of the input file for the report is displayed.

 

The first program is to create a data file (not the report) which provides a pre-processed view of the data supplied to it either by striping off the unneeded fields or by stripping off the unneeded fields and summing the data by state code. The numbers should not be formatted and no additional records should be produced.

 

The second program should read the file produced by the first program and produce the report in the format shown in the above image. This program should format the numbers and produce the file path information and column headings.

The first program will have 3 run-time parameters, the data source file path, the destination file path, and the number of records in the data file (13486) . 

If the program does not use the last run-time parameter, it should still accept it.

The second program will have 2 run-time parameters, the input file path and the number of records. If the program does not use the last run-time parameter, it should still accept it.

 

Features and Restrictions: 

This assignment is an individual effort. Collaboration with other students on design approaches, implementation techniques, etc. as well as using the course's Discussion Board and other course resources are encouraged but the design, implementation, and submitted files must be your own creation. 

 

A good reference for the Java 8 API is at: http://docs.oracle.com/javase/8/docs/api/ 

The programs should use standard (SE) Java 8 code and compile without errors or warnings. It should also run without errors or warnings when given valid input. 

 

The programs should provide reasonable parameter validation (correct number of parameters, reasonable values, etc.). 

 

The programs should not use any Java collections (ArrayList, Map, Vector, etc.) except standard Java arrays. 

 

Collections are introduced in a later module. The file produced by the first program should not be deleted after running the report program. 

 

The program's code should be reasonable formatted and commented as demonstrated so far in the course.

 

Resources:

File: SmallAreaIncomePovertyEstData.txt - contains the small area poverty data. It is a standard 8-bit readable text file. (https://www2.census.gov/programs-surveys/saipe/datasets/2013/2013-school-districts/ussd13.txt) << file

 

 

File: SmallAreaIncomePovertyEstLayout.txt - contains information about the field layout of the SmallAreaIncomePovertyEstData.txt file. (https://www2.census.gov/programs-surveys/saipe/technical-documentation/file-layouts/school-district/2017-district-layout.txt) << file

 

Please show me how to run program 

 

32
2,790,136
483,411
99,599
20.60
33
1,472,055
205,461
19,714
9.60
34
10,552,547
1,488,882
222,992
14.98
103,790
666,553
35
2,085,287
368,816
28.14
19,901,043
9,848,060
21.74
23.09
36
3,066,336
1,673,310
37
386,419
12,685
398,688
144 ,867
38
723,393
113,921
11.13
11,570,743
3,851,487
3,931,430
12,773,801
1,065,907
39
1,958,998
20.35
682,548
627,584
1,999,741
159,355
787,482
148,002
40
21.22
118,023
342,181
31,368
194,639
41
18.81
42
17.11
44
19.68
45
4,790,785
24.72
46
844,877
24,675
16.67
1,091,900
5,101,161
23.82
23.49
47
6,778,703
260,103
48
26,452,422
1,198,322
49
2,900,872
642,722
85,745
13.34
50
940,840
92,223
11,990
13.00
51
14.10
17.12
8,260,405
1,352,420
190,734
53
6,971,406
1,151,175
197,126
1,854,304
23.09
16.33
11.78
54
279,484
64,539
55
5,956,920
963,445
157,356
56
582,360
99,290
11,701
bins
Transcribed Image Text:32 2,790,136 483,411 99,599 20.60 33 1,472,055 205,461 19,714 9.60 34 10,552,547 1,488,882 222,992 14.98 103,790 666,553 35 2,085,287 368,816 28.14 19,901,043 9,848,060 21.74 23.09 36 3,066,336 1,673,310 37 386,419 12,685 398,688 144 ,867 38 723,393 113,921 11.13 11,570,743 3,851,487 3,931,430 12,773,801 1,065,907 39 1,958,998 20.35 682,548 627,584 1,999,741 159,355 787,482 148,002 40 21.22 118,023 342,181 31,368 194,639 41 18.81 42 17.11 44 19.68 45 4,790,785 24.72 46 844,877 24,675 16.67 1,091,900 5,101,161 23.82 23.49 47 6,778,703 260,103 48 26,452,422 1,198,322 49 2,900,872 642,722 85,745 13.34 50 940,840 92,223 11,990 13.00 51 14.10 17.12 8,260,405 1,352,420 190,734 53 6,971,406 1,151,175 197,126 1,854,304 23.09 16.33 11.78 54 279,484 64,539 55 5,956,920 963,445 157,356 56 582,360 99,290 11,701 bins
Population Child Population Child Poverity Population % Child Poverty
State
25.18
4,833,722
735,132
8,688,149
2,959,373
48,909,205
5,268,367
3,747,676
01
814,377
205,023
16,118
02
132,740
12.14
24.41
25.71
22.03
15.44
13.12
17.09
29.14
23.00
24.47
04
1,182,931
516,950
6,667,268
902,796
593,629
288,777
132,920
05
06
1,468,715
08
139,381
09
77,895
10
925,749
147,239
25,169
11
646,449
70,507
20,544
12
19,552,860
2,948,361
678,022
13
10,010,465
1,821,201
445 ,608
1,404,054
1,612,136
15
216,496
29,375
13.57
16
314,294
56,633
18.02
17
17,704,060
2,224,288
427,235
19.21
19.45
14.67
16.10
18
6,570,099
1,165,146
226,599
19
3,090,416
529,306
77,634
20
2,893,957
523,686
84,325
Transcribed Image Text:Population Child Population Child Poverity Population % Child Poverty State 25.18 4,833,722 735,132 8,688,149 2,959,373 48,909,205 5,268,367 3,747,676 01 814,377 205,023 16,118 02 132,740 12.14 24.41 25.71 22.03 15.44 13.12 17.09 29.14 23.00 24.47 04 1,182,931 516,950 6,667,268 902,796 593,629 288,777 132,920 05 06 1,468,715 08 139,381 09 77,895 10 925,749 147,239 25,169 11 646,449 70,507 20,544 12 19,552,860 2,948,361 678,022 13 10,010,465 1,821,201 445 ,608 1,404,054 1,612,136 15 216,496 29,375 13.57 16 314,294 56,633 18.02 17 17,704,060 2,224,288 427,235 19.21 19.45 14.67 16.10 18 6,570,099 1,165,146 226,599 19 3,090,416 529,306 77,634 20 2,893,957 523,686 84,325
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

second code got 14 errors 

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY