1. (city_data.txt). The data file contains the name, population and precipitation for 13 US cities. java program as follows:
- Read the data from the data file into three arrays, one to store the city names, one to store the populations, and another to store the precipitations.
- Output the city names, populations, and precipitations.
- Find and output the most and the least populous cities.
- Find and output the city with the most and the least precipitations.
- Format the output appropriately.
Sample run:
Name Population Precipitation
Sacramento 490,712 17.93
Kansas_City 475,378 37.98
San_Diego 1,394,928 10.77
Jacksonville 868,031 52.34
San_Francisco 864,816 20.11
New_York 8,550,405 49.69
Washington 672,228 39.35
Baltimore 621,849 41.94
St_Louis 315,685 38.75
Pittsburgh 304,391 37.85
Los_Angeles 3,971,883 13.15
San_Antonio 1,469,845 32.92
Honolulu 352,769 18.29
The most populous city is New_York with population 8,550,405.
The least populous city is Pittsburgh with population 304,391.
The most precipitation city is Jacksonville with precipitation 52.34.
The least precipitation city is San_Diego with precipitation 10.77.
(city_data.txt)Sacramento 490712 17.93
Kansas_City 475378 37.98
San_Diego 1394928 10.77
Jacksonville 868031 52.34
San_Francisco 864816 20.11
New_York 8550405 49.69
Washington 672228 39.35
Baltimore 621849 41.94
St_Louis 315685 38.75
Pittsburgh 304391 37.85
Los_Angeles 3971883 13.15
San_Antonio 1469845 32.92
Honolulu 352769 18.29