Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please use the java language and if possible to provide notes within the program

ID: 3869627 • Letter: P

Question

Please use the java language and if possible to provide notes within the program explaining the certain steps...Thank you

PopulationTableUN.txt lists the population of countries in order by increasing size as of July-2017. The population of the world is the first entry with a Rank of 0. The very top row of the file indicates titles for each column of data. You ignore this line when you read the data file.

The file Asg-1_C_Output.txt shows how your output file should look when your program is working. You will need careful format control of the output. As in parts A and B above refer to section 3.10 starting on page 164 of your textbook for doing format control of output. Also refer to your working solutions for Part-A and Part-B for the methodology.

Your program is to read the input file and store each data line in an object of class UNpopulation, which you must create. Thus each UNpopulation object will hold the data for one country and it will be added to an ArrayList of UNpopulation objects.

Your program then processes the ArrayList to calculate “Growth” and “%-Growth” for each country and prints the appropriate values to your output file. Use proper format control. You decide whether the extra calculations are performed in the UNpopulation class (recommended) or in your main program routines.

Be sure to determine what data types (int, long, double,or String) are needed for the various data items in your program.

PopulationTable-UN.txt

Rank,Pop July 2016,Pop July 2017,Country-Area__UN Continental__UN Statisical
0 7466964280 7550262101 World____
1 1403500365 1409517397 China[a]__Asia__Eastern Asia
2 1324171354 1339180127 India__Asia__Southern Asia
3 322179605 324459463 United States__Americas__Northern America
4 261115456 263991379 Indonesia__Asia__South-Eastern Asia
5 207652865 209288278 Brazil__Americas__South America
6 193203476 197015955 Pakistan__Asia__Southern Asia
7 185989640 190886311 Nigeria__Africa__Western Africa
8 162951560 164669751 Bangladesh__Asia__Southern Asia
9 143964513 143989754 Russia__Europe__Eastern Europe
10 127540423 129163276 Mexico__Americas__Central America
11 127748513 127484450 Japan__Asia__Eastern Asia
12 102403196 104957438 Ethiopia__Africa__Eastern Africa
13 103320222 104918090 Philippines__Asia__South-Eastern Asia
14 95688681 97553151 Egypt__Africa__Northern Africa
15 94569072 95540800 Vietnam__Asia__South-Eastern Asia
16 81914672 82114224 Germany__Europe__Western Europe
17 78736153 81339988 Democratic Republic of the Congo__Africa__Middle Africa
18 80277428 81162788 Iran__Asia__Southern Asia
19 79512426 80745020 Turkey__Asia__Western Asia
20 68863514 69037513 Thailand__Asia__South-Eastern Asia
21 65788574 66181585 United Kingdom__Europe__Northern Europe
22 64720690 64979548 France__Europe__Western Europe
23 59429938 59359900 Italy__Europe__Southern Europe
24 55572201 57310019 Tanzania[b]__Africa__Eastern Africa
25 56015473 56717156 South Africa__Africa__Southern Africa
26 52885223 53370609 Myanmar__Asia__South-Eastern Asia
27 50791919 50982212 South Korea__Asia__Eastern Asia
28 48461567 49699862 Kenya__Africa__Eastern Africa
29 48653419 49065615 Colombia__Americas__South America
30 46347576 46354321 Spain[c]__Europe__Southern Europe
31 43847430 44271041 Argentina__Americas__South America
32 44438625 44222947 Ukraine[d]__Europe__Eastern Europe
33 41487965 42862958 Uganda__Africa__Eastern Africa
34 40606052 41318142 Algeria__Africa__Northern Africa
35 39578828 40533330 Sudan__Africa__Northern Africa
36 37202572 38274618 Iraq__Asia__Western Asia
37 38224410 38170712 Poland__Europe__Eastern Europe
38 36289822 36624199 Canada__Americas__Northern America
39 35276786 35739580 Morocco__Africa__Northern Africa
40 34656032 35530081 Afghanistan__Asia__Southern Asia
41 32275687 32938213 Saudi Arabia__Asia__Western Asia
42 31773839 32165485 Peru__Americas__South America
43 31568179 31977065 Venezuela__Americas__South America
44 31446795 31910641 Uzbekistan__Asia__Central Asia
45 31187265 31624264 Malaysia[e]__Asia__South-Eastern Asia
46 28813463 29784193 Angola__Africa__Middle Africa
47 28829476 29668834 Mozambique__Africa__Eastern Africa
48 28982771 29304998 Nepal__Asia__Southern Asia
49 28206728 28833629 Ghana__Africa__Western Africa
50 27584213 28250420 Yemen__Asia__Western Asia
51 24894551 25570895 Madagascar__Africa__Eastern Africa
52 25368620 25490965 North Korea__Asia__Eastern Asia
53 24125848 24450561 Australia[f]__Oceania__Australia and New Zealand
54 23695919 24294750 Cote d'Ivoire__Africa__Western Africa
55 23439189 24053727 Cameroon__Africa__Middle Africa
56 23556706 23626456 Taiwan[g]__Asia__Eastern Asia
57 20672987 21477348 Niger__Africa__Western Africa
58 20798492 20876917 Sri Lanka__Asia__Southern Asia
59 19778083 19679306 Romania__Europe__Eastern Europe
60 18646433 19193382 Burkina Faso__Africa__Western Africa
61 18091575 18622104 Malawi__Africa__Eastern Africa
62 17994837 18541980 Mali__Africa__Western Africa
63 18430453 18269868 Syria__Asia__Western Asia
64 17987736 18204499 Kazakhstan__Asia__Central Asia
65 17909754 18054726 Chile__Americas__South America
66 16591390 17094130 Zambia__Africa__Eastern Africa
67 16987330 17035938 Netherlands__Europe__Western Europe
68 16582469 16913503 Guatemala__Americas__Central America
69 16385068 16624858 Ecuador__Americas__South America
70 16150362 16529904 Zimbabwe__Africa__Eastern Africa
71 15762370 16005373 Cambodia__Asia__South-Eastern Asia
72 15411614 15850567 Senegal__Africa__Western Africa
73 14452543 14899994 Chad__Africa__Middle Africa
74 14317996 14742523 Somalia__Africa__Eastern Africa
75 12395924 12717176 Guinea__Africa__Western Africa
76 12230730 12575714 South Sudan__Africa__Eastern Africa
77 11917508 12208407 Rwanda__Africa__Eastern Africa
78 11403248 11532127 Tunisia__Africa__Northern Africa
79 11475982 11484636 Cuba__Americas__Caribbean
80 11358379 11429336 Belgium__Europe__Western Europe
81 10872298 11175692 Benin__Africa__Western Africa
82 11183716 11159773 Greece__Europe__Southern Europe
83 10887882 11051600 Bolivia__Americas__South America
84 10847334 10981229 Haiti__Americas__Caribbean
85 10524117 10864245 Burundi__Africa__Eastern Africa
86 10648791 10766998 Dominican Republic__Americas__Caribbean
87 10610947 10618303 Czechia__Europe__Eastern Europe
88 10371627 10329506 Portugal__Europe__Southern Europe
89 9837533 9910701 Sweden__Europe__Northern Europe
90 9725376 9827589 Azerbaijan[h]__Asia__Western Asia
91 9753281 9721559 Hungary__Europe__Eastern Europe
92 9455802 9702353 Jordan__Asia__Western Asia
93 9480042 9468338 Belarus__Europe__Eastern Europe
94 9269612 9400145 United Arab Emirates__Asia__Western Asia
95 9112867 9265067 Honduras__Americas__Central America
96 8734951 8921343 Tajikistan__Asia__Central Asia
97 8820083 8790574 Serbia[i]__Europe__Southern Europe
98 8712137 8735453 Austria__Europe__Western Europe
99 8401739 8476005 Switzerland__Europe__Western Europe
100 8191828 8321570 Israel__Asia__Western Asia
101 8084991 8251162 Papua New Guinea__Oceania__Melanesia
102 7606374 7797694 Togo__Africa__Western Africa
103 7396190 7557212 Sierra Leone__Africa__Western Africa
104 7302843 7364883 Hong Kong__Asia__Eastern Asia
105 7131494 7084571 Bulgaria__Europe__Eastern Europe
106 6758353 6858160 Laos__Asia__South-Eastern Asia
107 6725308 6811297 Paraguay__Americas__South America
108 6344722 6377853 El Salvador__Americas__Central America
109 6293253 6374616 Libya__Africa__Northern Africa
110 6149928 6217581 Nicaragua__Americas__Central America
111 6006668 6082357 Lebanon__Asia__Western Asia
112 5955734 6045117 Kyrgyzstan__Asia__Central Asia
113 5662544 5758075 Turkmenistan__Asia__Central Asia
114 5711870 5733551 Denmark__Europe__Northern Europe
115 5622455 5708844 Singapore__Asia__South-Eastern Asia
116 5503132 5523231 Finland[j]__Europe__Northern Europe
117 5444218 5447662 Slovakia__Europe__Eastern Europe
118 5254694 5305383 Norway[k]__Europe__Northern Europe
119 5125821 5260750 Congo__Africa__Middle Africa
120 4954645 5068831 Eritrea__Africa__Eastern Africa
121 4790705 4920724 Palestine[l]__Asia__Western Asia
122 4857274 4905769 Costa Rica__Americas__Central America
123 4726078 4761657 Ireland__Europe__Northern Europe
124 4613823 4731906 Liberia__Africa__Western Africa
125 4660833 4705818 New Zealand__Oceania__Australia and New Zealand
126 4594621 4659080 Central African Republic__Africa__Middle Africa
127 4424762 4636262 Oman__Asia__Western Asia
128 4301018 4420184 Mauritania__Africa__Western Africa
129 4213265 4189353 Croatia__Europe__Southern Europe
130 4052584 4136528 Kuwait__Asia__Western Asia
131 4034119 4098587 Panama__Americas__Central America
132 4059608 4051212 Moldova[m]__Europe__Eastern Europe
133 3925405 3912061 Georgia[n]__Asia__Western Asia
134 3667903 3663131 Puerto Rico__Americas__Caribbean
135 3516816 3507017 Bosnia and Herzegovina__Europe__Southern Europe
136 3444006 3456750 Uruguay__Americas__South America
137 3027398 3075647 Mongolia__Asia__Eastern Asia
138 2924816 2930450 Armenia__Asia__Western Asia
139 2926348 2930187 Albania__Europe__Southern Europe
140 2881355 2890299 Jamaica__Americas__Caribbean
141 2908249 2890297 Lithuania__Europe__Northern Europe
142 2569804 2639211 Qatar__Asia__Western Asia
143 2479713 2533794 Namibia__Africa__Southern Africa
144 2250260 2291661 Botswana__Africa__Southern Africa
145 2203821 2233339 Lesotho__Africa__Southern Africa
146 2038501 2100568 The Gambia__Africa__Western Africa
147 2081206 2083160 Republic of Macedonia__Europe__Southern Europe
148 2077862 2079976 Slovenia__Europe__Southern Europe
149 1979786 2025137 Gabon__Africa__Middle Africa
150 1970530 1949670 Latvia__Europe__Northern Europe
151 1815698 1861283 Guinea-Bissau__Africa__Western Africa
152 1425171 1492584 Bahrain__Asia__Western Asia
153 1364962 1369125 Trinidad and Tobago__Americas__Caribbean
154 1343098 1367254 Swaziland__Africa__Southern Africa
155 1312442 1309632 Estonia__Europe__Northern Europe
156 1268671 1296311 Timor-Leste__Asia__South-Eastern Asia
157 1221490 1267689 Equatorial Guinea__Africa__Middle Africa
158 1262132 1265138 Mauritius[o]__Africa__Eastern Africa
159 1170125 1179551 Cyprus[p]__Asia__Western Asia
160 942333 956985 Djibouti__Africa__Eastern Africa
161 898760 905502 Fiji__Oceania__Melanesia
162 869925 876562 Reunion__Africa__Eastern Africa
163 795601 813912 Comoros__Africa__Eastern Africa
164 797765 807610 Bhutan__Asia__Southern Asia
165 773303 777859 Guyana__Americas__South America
166 628615 628960 Montenegro__Europe__Southern Europe
167 612167 622567 Macau__Asia__Eastern Asia
168 599419 611343 Solomon Islands__Oceania__Melanesia
169 575747 583455 Luxembourg__Europe__Western Europe
170 558368 563402 Suriname__Americas__South America
171 538755 552628 Western Sahara__Africa__Northern Africa
172 539560 546388 Cabo Verde__Africa__Western Africa
173 449975 449568 Guadeloupe[q]__Americas__Caribbean
174 427756 436330 Maldives__Asia__Southern Asia
175 429362 430835 Malta__Europe__Southern Europe
176 423196 428697 Brunei__Asia__South-Eastern Asia
177 391232 395361 Bahamas__Americas__Caribbean
178 385103 384896 Martinique__Americas__Caribbean
179 366954 374681 Belize__Americas__Central America
180 332474 335025 Iceland__Europe__Northern Europe
181 284996 285719 Barbados__Americas__Caribbean
182 280208 283007 French Polynesia__Oceania__Polynesia
183 275713 282731 French Guiana__Americas__South America
184 272677 276255 New Caledonia__Oceania__Melanesia
185 270402 276244 Vanuatu__Oceania__Melanesia
186 246489 253045 Mayotte__Africa__Eastern Africa
187 199910 204327 Sao Tome and Principe__Africa__Middle Africa
188 195125 196440 Samoa__Oceania__Polynesia
189 178015 178844 Saint Lucia__Americas__Caribbean
190 164541 165314 GuernseyandJersey__Europe__Northern Europe
191 162896 164229 Guam__Oceania__Micronesia
192 159371 160539 Curaao__Americas__Caribbean
193 114395 116398 Kiribati__Oceania__Micronesia
194 109643 109897 Saint Vincent and the Grenadines__Americas__Caribbean
195 107122 108020 Tonga__Oceania__Polynesia
196 107317 107825 Grenada__Americas__Caribbean
197 104937 105544 Federated States of Micronesia__Oceania__Micronesia
198 104822 105264 Aruba__Americas__Caribbean
199 104913 104901 United States Virgin Islands__Americas__Caribbean
200 100963 102012 Antigua and Barbuda__Americas__Caribbean
201 94228 94737 Seychelles__Africa__Eastern Africa
202 83737 84287 Isle of Man__Europe__Northern Europe
203 77281 76965 Andorra__Europe__Southern Europe
204 73543 73925 Dominica__Americas__Caribbean
205 60765 61559 Cayman Islands__Americas__Caribbean
206 61666 61349 Bermuda__Americas__Northern America
207 56412 56480 Greenland__Americas__Northern America
208 55599 55641 American Samoa__Oceania__Polynesia
209 54821 55345 Saint Kitts and Nevis__Americas__Caribbean
210 55023 55144 Northern Mariana Islands__Oceania__Micronesia
211 53066 53127 Marshall Islands__Oceania__Micronesia
212 49117 49290 Faroe Islands__Europe__Northern Europe
213 39537 40120 Sint Maarten__Americas__Caribbean
214 38499 38695 Monaco__Europe__Western Europe
215 37666 37922 Liechtenstein__Europe__Western Europe
216 34900 35446 Turks and Caicos Islands__Americas__Caribbean
217 34408 34571 Gibraltar__Europe__Southern Europe
218 33203 33400 San Marino__Europe__Southern Europe
219 30661 31196 British Virgin Islands__Americas__Caribbean
220 25019 25398 Caribbean Netherlands[r]__Americas__Caribbean
221 21503 21729 Palau__Oceania__Micronesia
222 17379 17380 Cook Islands__Oceania__Polynesia
223 14764 14909 Anguilla__Americas__Caribbean
224 11899 11773 Wallis and Futuna__Oceania__Polynesia
225 11347 11359 Nauru__Oceania__Micronesia
226 11097 11192 Tuvalu__Oceania__Polynesia
227 6305 6320 Saint Pierre and Miquelon__Americas__Northern America
228 5152 5177 Montserrat__Americas__Caribbean
229 4035 4049 Saint Helena__ Ascension and Tristan da Cunha"__Africa
230 2910 2910 Falkland Islands__Americas__South America
231 1624 1618 Niue__Oceania__Polynesia
232 1282 1300 Tokelau__Oceania__Polynesia
233 801 792 Vatican City[s]__Europe__Southern Europe

Asg-1_C_Output.txt

Test output fileAsg-1_C.
Rank Pop_July_2016 Pop_July_2017 Growth %-Growth Country_Location
0 7,466,964,280 7,550,262,101 83,297,821 1.116 World____
1 1,403,500,365 1,409,517,397 6,017,032 0.429 China[a]__Asia__Eastern Asia
2 1,324,171,354 1,339,180,127 15,008,773 1.133 India__Asia__Southern Asia
3 322,179,605 324,459,463 2,279,858 0.708 United States__Americas__Northern America
4 261,115,456 263,991,379 2,875,923 1.101 Indonesia__Asia__South-Eastern Asia
5 207,652,865 209,288,278 1,635,413 0.788 Brazil__Americas__South America
6 193,203,476 197,015,955 3,812,479 1.973 Pakistan__Asia__Southern Asia
7 185,989,640 190,886,311 4,896,671 2.633 Nigeria__Africa__Western Africa
8 162,951,560 164,669,751 1,718,191 1.054 Bangladesh__Asia__Southern Asia
9 143,964,513 143,989,754 25,241 0.018 Russia__Europe__Eastern Europe
10 127,540,423 129,163,276 1,622,853 1.272 Mexico__Americas__Central America
11 127,748,513 127,484,450 -264,063 -0.207 Japan__Asia__Eastern Asia
12 102,403,196 104,957,438 2,554,242 2.494 Ethiopia__Africa__Eastern Africa
13 103,320,222 104,918,090 1,597,868 1.547 Philippines__Asia__South-Eastern Asia
14 95,688,681 97,553,151 1,864,470 1.948 Egypt__Africa__Northern Africa
15 94,569,072 95,540,800 971,728 1.028 Vietnam__Asia__South-Eastern Asia
16 81,914,672 82,114,224 199,552 0.244 Germany__Europe__Western Europe
17 78,736,153 81,339,988 2,603,835 3.307 Democratic Republic of the Congo__Africa__Middle Africa
18 80,277,428 81,162,788 885,360 1.103 Iran__Asia__Southern Asia
19 79,512,426 80,745,020 1,232,594 1.550 Turkey__Asia__Western Asia
20 68,863,514 69,037,513 173,999 0.253 Thailand__Asia__South-Eastern Asia
21 65,788,574 66,181,585 393,011 0.597 United Kingdom__Europe__Northern Europe
22 64,720,690 64,979,548 258,858 0.400 France__Europe__Western Europe
23 59,429,938 59,359,900 -70,038 -0.118 Italy__Europe__Southern Europe
24 55,572,201 57,310,019 1,737,818 3.127 Tanzania[b]__Africa__Eastern Africa
25 56,015,473 56,717,156 701,683 1.253 South Africa__Africa__Southern Africa
26 52,885,223 53,370,609 485,386 0.918 Myanmar__Asia__South-Eastern Asia
27 50,791,919 50,982,212 190,293 0.375 South Korea__Asia__Eastern Asia
28 48,461,567 49,699,862 1,238,295 2.555 Kenya__Africa__Eastern Africa
29 48,653,419 49,065,615 412,196 0.847 Colombia__Americas__South America
30 46,347,576 46,354,321 6,745 0.015 Spain[c]__Europe__Southern Europe
31 43,847,430 44,271,041 423,611 0.966 Argentina__Americas__South America
32 44,438,625 44,222,947 -215,678 -0.485 Ukraine[d]__Europe__Eastern Europe
33 41,487,965 42,862,958 1,374,993 3.314 Uganda__Africa__Eastern Africa
34 40,606,052 41,318,142 712,090 1.754 Algeria__Africa__Northern Africa
35 39,578,828 40,533,330 954,502 2.412 Sudan__Africa__Northern Africa
36 37,202,572 38,274,618 1,072,046 2.882 Iraq__Asia__Western Asia
37 38,224,410 38,170,712 -53,698 -0.140 Poland__Europe__Eastern Europe
38 36,289,822 36,624,199 334,377 0.921 Canada__Americas__Northern America
39 35,276,786 35,739,580 462,794 1.312 Morocco__Africa__Northern Africa
40 34,656,032 35,530,081 874,049 2.522 Afghanistan__Asia__Southern Asia
41 32,275,687 32,938,213 662,526 2.053 Saudi Arabia__Asia__Western Asia
42 31,773,839 32,165,485 391,646 1.233 Peru__Americas__South America
43 31,568,179 31,977,065 408,886 1.295 Venezuela__Americas__South America
44 31,446,795 31,910,641 463,846 1.475 Uzbekistan__Asia__Central Asia
45 31,187,265 31,624,264 436,999 1.401 Malaysia[e]__Asia__South-Eastern Asia
46 28,813,463 29,784,193 970,730 3.369 Angola__Africa__Middle Africa
47 28,829,476 29,668,834 839,358 2.911 Mozambique__Africa__Eastern Africa
48 28,982,771 29,304,998 322,227 1.112 Nepal__Asia__Southern Asia
49 28,206,728 28,833,629 626,901 2.223 Ghana__Africa__Western Africa
50 27,584,213 28,250,420 666,207 2.415 Yemen__Asia__Western Asia
51 24,894,551 25,570,895 676,344 2.717 Madagascar__Africa__Eastern Africa
52 25,368,620 25,490,965 122,345 0.482 North Korea__Asia__Eastern Asia
53 24,125,848 24,450,561 324,713 1.346 Australia[f]__Oceania__Australia and New Zealand
54 23,695,919 24,294,750 598,831 2.527 Cote d'Ivoire__Africa__Western Africa
55 23,439,189 24,053,727 614,538 2.622 Cameroon__Africa__Middle Africa
56 23,556,706 23,626,456 69,750 0.296 Taiwan[g]__Asia__Eastern Asia
57 20,672,987 21,477,348 804,361 3.891 Niger__Africa__Western Africa
58 20,798,492 20,876,917 78,425 0.377 Sri Lanka__Asia__Southern Asia
59 19,778,083 19,679,306 -98,777 -0.499 Romania__Europe__Eastern Europe
60 18,646,433 19,193,382 546,949 2.933 Burkina Faso__Africa__Western Africa
61 18,091,575 18,622,104 530,529 2.932 Malawi__Africa__Eastern Africa
62 17,994,837 18,541,980 547,143 3.041 Mali__Africa__Western Africa
63 18,430,453 18,269,868 -160,585 -0.871 Syria__Asia__Western Asia
64 17,987,736 18,204,499 216,763 1.205 Kazakhstan__Asia__Central Asia
65 17,909,754 18,054,726 144,972 0.809 Chile__Americas__South America
66 16,591,390 17,094,130 502,740 3.030 Zambia__Africa__Eastern Africa
67 16,987,330 17,035,938 48,608 0.286 Netherlands__Europe__Western Europe
68 16,582,469 16,913,503 331,034 1.996 Guatemala__Americas__Central America
69 16,385,068 16,624,858 239,790 1.463 Ecuador__Americas__South America
70 16,150,362 16,529,904 379,542 2.350 Zimbabwe__Africa__Eastern Africa
71 15,762,370 16,005,373 243,003 1.542 Cambodia__Asia__South-Eastern Asia
72 15,411,614 15,850,567 438,953 2.848 Senegal__Africa__Western Africa
73 14,452,543 14,899,994 447,451 3.096 Chad__Africa__Middle Africa
74 14,317,996 14,742,523 424,527 2.965 Somalia__Africa__Eastern Africa
75 12,395,924 12,717,176 321,252 2.592 Guinea__Africa__Western Africa
76 12,230,730 12,575,714 344,984 2.821 South Sudan__Africa__Eastern Africa
77 11,917,508 12,208,407 290,899 2.441 Rwanda__Africa__Eastern Africa
78 11,403,248 11,532,127 128,879 1.130 Tunisia__Africa__Northern Africa
79 11,475,982 11,484,636 8,654 0.075 Cuba__Americas__Caribbean
80 11,358,379 11,429,336 70,957 0.625 Belgium__Europe__Western Europe
81 10,872,298 11,175,692 303,394 2.791 Benin__Africa__Western Africa
82 11,183,716 11,159,773 -23,943 -0.214 Greece__Europe__Southern Europe
83 10,887,882 11,051,600 163,718 1.504 Bolivia__Americas__South America
84 10,847,334 10,981,229 133,895 1.234 Haiti__Americas__Caribbean
85 10,524,117 10,864,245 340,128 3.232 Burundi__Africa__Eastern Africa
86 10,648,791 10,766,998 118,207 1.110 Dominican Republic__Americas__Caribbean
87 10,610,947 10,618,303 7,356 0.069 Czechia__Europe__Eastern Europe
88 10,371,627 10,329,506 -42,121 -0.406 Portugal__Europe__Southern Europe
89 9,837,533 9,910,701 73,168 0.744 Sweden__Europe__Northern Europe
90 9,725,376 9,827,589 102,213 1.051 Azerbaijan[h]__Asia__Western Asia
91 9,753,281 9,721,559 -31,722 -0.325 Hungary__Europe__Eastern Europe
92 9,455,802 9,702,353 246,551 2.607 Jordan__Asia__Western Asia
93 9,480,042 9,468,338 -11,704 -0.123 Belarus__Europe__Eastern Europe
94 9,269,612 9,400,145 130,533 1.408 United Arab Emirates__Asia__Western Asia
95 9,112,867 9,265,067 152,200 1.670 Honduras__Americas__Central America
96 8,734,951 8,921,343 186,392 2.134 Tajikistan__Asia__Central Asia
97 8,820,083 8,790,574 -29,509 -0.335 Serbia[i]__Europe__Southern Europe
98 8,712,137 8,735,453 23,316 0.268 Austria__Europe__Western Europe
99 8,401,739 8,476,005 74,266 0.884 Switzerland__Europe__Western Europe
100 8,191,828 8,321,570 129,742 1.584 Israel__Asia__Western Asia
101 8,084,991 8,251,162 166,171 2.055 Papua New Guinea__Oceania__Melanesia
102 7,606,374 7,797,694 191,320 2.515 Togo__Africa__Western Africa
103 7,396,190 7,557,212 161,022 2.177 Sierra Leone__Africa__Western Africa
104 7,302,843 7,364,883 62,040 0.850 Hong Kong__Asia__Eastern Asia
105 7,131,494 7,084,571 -46,923 -0.658 Bulgaria__Europe__Eastern Europe
106 6,758,353 6,858,160 99,807 1.477 Laos__Asia__South-Eastern Asia
107 6,725,308 6,811,297 85,989 1.279 Paraguay__Americas__South America
108 6,344,722 6,377,853 33,131 0.522 El Salvador__Americas__Central America
109 6,293,253 6,374,616 81,363 1.293 Libya__Africa__Northern Africa
110 6,149,928 6,217,581 67,653 1.100 Nicaragua__Americas__Central America
111 6,006,668 6,082,357 75,689 1.260 Lebanon__Asia__Western Asia
112 5,955,734 6,045,117 89,383 1.501 Kyrgyzstan__Asia__Central Asia
113 5,662,544 5,758,075 95,531 1.687 Turkmenistan__Asia__Central Asia
114 5,711,870 5,733,551 21,681 0.380 Denmark__Europe__Northern Europe
115 5,622,455 5,708,844 86,389 1.536 Singapore__Asia__South-Eastern Asia
116 5,503,132 5,523,231 20,099 0.365 Finland[j]__Europe__Northern Europe
117 5,444,218 5,447,662 3,444 0.063 Slovakia__Europe__Eastern Europe
118 5,254,694 5,305,383 50,689 0.965 Norway[k]__Europe__Northern Europe
119 5,125,821 5,260,750 134,929 2.632 Congo__Africa__Middle Africa
120 4,954,645 5,068,831 114,186 2.305 Eritrea__Africa__Eastern Africa
121 4,790,705 4,920,724 130,019 2.714 Palestine[l]__Asia__Western Asia
122 4,857,274 4,905,769 48,495 0.998 Costa Rica__Americas__Central America
123 4,726,078 4,761,657 35,579 0.753 Ireland__Europe__Northern Europe
124 4,613,823 4,731,906 118,083 2.559 Liberia__Africa__Western Africa
125 4,660,833 4,705,818 44,985 0.965 New Zealand__Oceania__Australia and New Zealand
126 4,594,621 4,659,080 64,459 1.403 Central African Republic__Africa__Middle Africa
127 4,424,762 4,636,262 211,500 4.780 Oman__Asia__Western Asia
128 4,301,018 4,420,184 119,166 2.771 Mauritania__Africa__Western Africa
129 4,213,265 4,189,353 -23,912 -0.568 Croatia__Europe__Southern Europe
130 4,052,584 4,136,528 83,944 2.071 Kuwait__Asia__Western Asia
131 4,034,119 4,098,587 64,468 1.598 Panama__Americas__Central America
132 4,059,608 4,051,212 -8,396 -0.207 Moldova[m]__Europe__Eastern Europe
133 3,925,405 3,912,061 -13,344 -0.340 Georgia[n]__Asia__Western Asia
134 3,667,903 3,663,131 -4,772 -0.130 Puerto Rico__Americas__Caribbean
135 3,516,816 3,507,017 -9,799 -0.279 Bosnia and Herzegovina__Europe__Southern Europe
136 3,444,006 3,456,750 12,744 0.370 Uruguay__Americas__South America
137 3,027,398 3,075,647 48,249 1.594 Mongolia__Asia__Eastern Asia
138 2,924,816 2,930,450 5,634 0.193 Armenia__Asia__Western Asia
139 2,926,348 2,930,187 3,839 0.131 Albania__Europe__Southern Europe
140 2,881,355 2,890,299 8,944 0.310 Jamaica__Americas__Caribbean
141 2,908,249 2,890,297 -17,952 -0.617 Lithuania__Europe__Northern Europe
142 2,569,804 2,639,211 69,407 2.701 Qatar__Asia__Western Asia
143 2,479,713 2,533,794 54,081 2.181 Namibia__Africa__Southern Africa
144 2,250,260 2,291,661 41,401 1.840 Botswana__Africa__Southern Africa
145 2,203,821 2,233,339 29,518 1.339 Lesotho__Africa__Southern Africa
146 2,038,501 2,100,568 62,067 3.045 The Gambia__Africa__Western Africa
147 2,081,206 2,083,160 1,954 0.094 Republic of Macedonia__Europe__Southern Europe
148 2,077,862 2,079,976 2,114 0.102 Slovenia__Europe__Southern Europe
149 1,979,786 2,025,137 45,351 2.291 Gabon__Africa__Middle Africa
150 1,970,530 1,949,670 -20,860 -1.059 Latvia__Europe__Northern Europe
151 1,815,698 1,861,283 45,585 2.511 Guinea-Bissau__Africa__Western Africa
152 1,425,171 1,492,584 67,413 4.730 Bahrain__Asia__Western Asia
153 1,364,962 1,369,125 4,163 0.305 Trinidad and Tobago__Americas__Caribbean
154 1,343,098 1,367,254 24,156 1.799 Swaziland__Africa__Southern Africa
155 1,312,442 1,309,632 -2,810 -0.214 Estonia__Europe__Northern Europe
156 1,268,671 1,296,311 27,640 2.179 Timor-Leste__Asia__South-Eastern Asia
157 1,221,490 1,267,689 46,199 3.782 Equatorial Guinea__Africa__Middle Africa
158 1,262,132 1,265,138 3,006 0.238 Mauritius[o]__Africa__Eastern Africa
159 1,170,125 1,179,551 9,426 0.806 Cyprus[p]__Asia__Western Asia
160 942,333 956,985 14,652 1.555 Djibouti__Africa__Eastern Africa
161 898,760 905,502 6,742 0.750 Fiji__Oceania__Melanesia
162 869,925 876,562 6,637 0.763 Reunion__Africa__Eastern Africa
163 795,601 813,912 18,311 2.302 Comoros__Africa__Eastern Africa
164 797,765 807,610 9,845 1.234 Bhutan__Asia__Southern Asia
165 773,303 777,859 4,556 0.589 Guyana__Americas__South America
166 628,615 628,960 345 0.055 Montenegro__Europe__Southern Europe
167 612,167 622,567 10,400 1.699 Macau__Asia__Eastern Asia
168 599,419 611,343 11,924 1.989 Solomon Islands__Oceania__Melanesia
169 575,747 583,455 7,708 1.339 Luxembourg__Europe__Western Europe
170 558,368 563,402 5,034 0.902 Suriname__Americas__South America
171 538,755 552,628 13,873 2.575 Western Sahara__Africa__Northern Africa
172 539,560 546,388 6,828 1.265 Cabo Verde__Africa__Western Africa
173 449,975 449,568 -407 -0.090 Guadeloupe[q]__Americas__Caribbean
174 427,756 436,330 8,574 2.004 Maldives__Asia__Southern Asia
175 429,362 430,835 1,473 0.343 Malta__Europe__Southern Europe
176 423,196 428,697 5,501 1.300 Brunei__Asia__South-Eastern Asia
177 391,232 395,361 4,129 1.055 Bahamas__Americas__Caribbean
178 385,103 384,896 -207 -0.054 Martinique__Americas__Caribbean
179 366,954 374,681 7,727 2.106 Belize__Americas__Central America
180 332,474 335,025 2,551 0.767 Iceland__Europe__Northern Europe
181 284,996 285,719 723 0.254 Barbados__Americas__Caribbean
182 280,208 283,007 2,799 0.999 French Polynesia__Oceania__Polynesia
183 275,713 282,731 7,018 2.545 French Guiana__Americas__South America
184 272,677 276,255 3,578 1.312 New Caledonia__Oceania__Melanesia
185 270,402 276,244 5,842 2.160 Vanuatu__Oceania__Melanesia
186 246,489 253,045 6,556 2.660 Mayotte__Africa__Eastern Africa
187 199,910 204,327 4,417 2.209 Sao Tome and Principe__Africa__Middle Africa
188 195,125 196,440 1,315 0.674 Samoa__Oceania__Polynesia
189 178,015 178,844 829 0.466 Saint Lucia__Americas__Caribbean
190 164,541 165,314 773 0.470 GuernseyandJersey__Europe__Northern Europe
191 162,896 164,229 1,333 0.818 Guam__Oceania__Micronesia
192 159,371 160,539 1,168 0.733 Curaao__Americas__Caribbean
193 114,395 116,398 2,003 1.751 Kiribati__Oceania__Micronesia
194 109,643 109,897 254 0.232 Saint Vincent and the Grenadines__Americas__Caribbean
195 107,122 108,020 898 0.838 Tonga__Oceania__Polynesia
196 107,317 107,825 508 0.473 Grenada__Americas__Caribbean
197 104,937 105,544 607 0.578 Federated States of Micronesia__Oceania__Micronesia
198 104,822 105,264 442 0.422 Aruba__Americas__Caribbean
199 104,913 104,901 -12 -0.011 United States Virgin Islands__Americas__Caribbean
200 100,963 102,012 1,049 1.039 Antigua and Barbuda__Americas__Caribbean
201 94,228 94,737 509 0.540 Seychelles__Africa__Eastern Africa
202 83,737 84,287 550 0.657 Isle of Man__Europe__Northern Europe
203 77,281 76,965 -316 -0.409 Andorra__Europe__Southern Europe
204 73,543 73,925 382 0.519 Dominica__Americas__Caribbean
205 60,765 61,559 794 1.307 Cayman Islands__Americas__Caribbean
206 61,666 61,349 -317 -0.514 Bermuda__Americas__Northern America
207 56,412 56,480 68 0.121 Greenland__Americas__Northern America
208 55,599 55,641 42 0.076 American Samoa__Oceania__Polynesia
209 54,821 55,345 524 0.956 Saint Kitts and Nevis__Americas__Caribbean
210 55,023 55,144 121 0.220 Northern Mariana Islands__Oceania__Micronesia
211 53,066 53,127 61 0.115 Marshall Islands__Oceania__Micronesia
212 49,117 49,290 173 0.352 Faroe Islands__Europe__Northern Europe
213 39,537 40,120 583 1.475 Sint Maarten__Americas__Caribbean
214 38,499 38,695 196 0.509 Monaco__Europe__Western Europe
215 37,666 37,922 256 0.680 Liechtenstein__Europe__Western Europe
216 34,900 35,446 546 1.564 Turks and Caicos Islands__Americas__Caribbean
217 34,408 34,571 163 0.474 Gibraltar__Europe__Southern Europe
218 33,203 33,400 197 0.593 San Marino__Europe__Southern Europe
219 30,661 31,196 535 1.745 British Virgin Islands__Americas__Caribbean
220 25,019 25,398 379 1.515 Caribbean Netherlands[r]__Americas__Caribbean
221 21,503 21,729 226 1.051 Palau__Oceania__Micronesia
222 17,379 17,380 1 0.006 Cook Islands__Oceania__Polynesia
223 14,764 14,909 145 0.982 Anguilla__Americas__Caribbean
224 11,899 11,773 -126 -1.059 Wallis and Futuna__Oceania__Polynesia
225 11,347 11,359 12 0.106 Nauru__Oceania__Micronesia
226 11,097 11,192 95 0.856 Tuvalu__Oceania__Polynesia
227 6,305 6,320 15 0.238 Saint Pierre and Miquelon__Americas__Northern America
228 5,152 5,177 25 0.485 Montserrat__Americas__Caribbean
229 4,035 4,049 14 0.347 Saint Helena__ Ascension and Tristan da Cunha"__Africa
230 2,910 2,910 0 0.000 Falkland Islands__Americas__South America
231 1,624 1,618 -6 -0.369 Niue__Oceania__Polynesia
232 1,282 1,300 18 1.404 Tokelau__Oceania__Polynesia
233 801 792 -9 -1.124 Vatican City[s]__Europe__Southern Europe

Explanation / Answer

Hi,

1.UNpopulation.java

import java.text.DecimalFormat;

public class UNpopulation {
   private int rank;
   private long previousYearPopulation;
   private long nextYearPopulation;
   private String countryName;
   private long growth;
   private double growthPercentage;
  
   DecimalFormat df = new DecimalFormat("#.###");
  
   public UNpopulation(int rank, long previousYearPopulation, long nextYearPopulation, String countryName) {
       this.rank = rank;
       this.previousYearPopulation = previousYearPopulation;
       this.nextYearPopulation = nextYearPopulation;
       this.countryName = countryName;
       // calculate growth in pop and assign to variable
       this.growth = calculateGrowth();
      
       // calculate % growth in pop and assign to variable
       this.growthPercentage = calculateGrowthPercentage();
   }
  

   /**
   * @return
   */
   private long calculateGrowth() {
      
       return (nextYearPopulation - previousYearPopulation);// get difference from Pop July 2017 to Pop July 2016
   }
  
   /**
   * @return
   */
   private double calculateGrowthPercentage() {
  
       double percentage = 0;
       percentage = (double)growth*100/previousYearPopulation;// calculate % of growth

       return percentage;
   }
  
   /**
   * @return
   */
   @Override
   public String toString() {
      
       return rank+" "+ previousYearPopulation +" "+ nextYearPopulation+ " "+growth +" "+ df.format(growthPercentage) +" "+ countryName;
   }
  
   public int getRank()
   {
       return rank;
   }
   public void setRank(int rank)
   {
       this.rank = rank;
   }
   public long getPreviousYearPopulation()
   {
       return previousYearPopulation;
   }
   public void setPreviousYearPopulation(long previousYearPopulation)
   {
       this.previousYearPopulation = previousYearPopulation;
   }
   public long getNextYearPopulation()
   {
       return nextYearPopulation;
   }
   public void setNextYearPopulation(long nextYearPopulation)
   {
       this.nextYearPopulation = nextYearPopulation;
   }
   public String getCountryName()
   {
       return countryName;
   }
   public void setCountryName(String countryName)
   {
       this.countryName = countryName;
   }
   public long getGrowth()
   {
       return growth;
   }
   public void setGrowth(long growth)
   {
       this.growth = growth;
   }
   public double getGrowthPercentage()
   {
       return growthPercentage;
   }
   public void setGrowthPercentage(double growthPercentage)
   {
       this.growthPercentage = growthPercentage;
   }
  
}

2. PopulationDriver.java

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class PopulationDriver {
  
   public static void main(String[] args) {
      
       ArrayList<UNpopulation> populationList = new ArrayList<>();
      
       try {
          
            BufferedReader in = new BufferedReader(new FileReader("PopulationTable-UN.txt"));
            String line;       
            while ((line = in.readLine()) != null) {
               //System.out.println(line);
               String[] str = line.split(" ");
                UNpopulation p = new UNpopulation(Integer.parseInt(str[0]), Long.parseLong(str[1]), Long.parseLong(str[2]), str[3]);
                populationList.add(p);            
            }
          
            in.close();
          
       } catch (IOException e) {
          
           System.out.println("File not found");
       }
      
      
       BufferedWriter bw = null;
       FileWriter fw = null;

       try {

           fw = new FileWriter("Asg-1_C_Output.txt");
           bw = new BufferedWriter(fw);
           bw.write("Rank Pop_July_2016 Pop_July_2017 Growth %-Growth Country_Location ");
           for (int i = 0; i<populationList.size(); i++) {
               bw.write(populationList.get(i).toString()+" ");
           }
          
           System.out.println("Done");
          
       } catch (IOException e) {
          
           System.out.println("Write File not found");
          
       } finally {
           try {
               if (bw != null)
                   bw.close();
               if (fw != null)
                   fw.close();
           } catch (IOException ex) {
               System.out.println("Data can not write into file");
           }
       }
   }

}

Let me know if any change required.