This is a modification of Exercise 2 from week 7 practical exercises to incorporate the use of arrays to store the data from the file. Import a copy of COVIDdata.java that you developed in phase 1. To test your program use the COVID-19GlobalData.txt
a. Modify your solution to use four (4) arrays (do not use an arraylists) as follows:
That is, as the data is read from the text file, store the values into the appropriate arrays so that all values are maintained in memory for processing. Assume that each array can store a maximum of 200 values.
b. Modify your solution so that after the data is read from the file into the four arrays it displays the following menu of program options:
Display Total Cases
Display New Cases in Last 7 days
Display New Cases in Last 24 hours
Display All Data
c. Modify your solution to obtain the users choice from the menu and process their response as follows:
Display Total Cases: display the contents of the country names array and the cumulative case totals array. For example, see image.
Display New Cases in Last 7 days: display the contents of the country names array and the newly reported cases in the last 7 days array. For example, see image.
Display New Cases in Last 24 hours: display the contents of the country names array and the newly reported cases in the last 24 hours array. For example, see image.
Display All Data: display the contents of all four (4) arrays. For example,
COVID-19GlobalData.txt
Global 213752662 4519052 655952
USA 37969371 1042666 153132
India 32558530 236272 46164
Brazil 20614866 198683 30872
RussianFederation 6824540 140009 19630
UK 6590751 234860 35547
France 6493798 132127 23427
Turkey 6273681 135229 19970
Argentina 5148085 51642 8119
Colombia 4894702 20533 2467
Spain 4815205 59730 5401
Iran 4796377 239960 39983
Italy 4502396 45631 7539
Indonesia 4026837 96537 0
Germany 3901799 58024 12626
Mexico 3249878 126626 18262
Poland 2887485 1406 215
SouthAfrica 2722202 83221 13251
Ukraine 2278171 7945 1581
Peru 2143691 7864 1126
Netherlands 1926424 17363 2863
Philippines 1883088 106980 13573
Iraq 1847697 46333 7787
Czechia 1678331 1302 248
Chile 1635173 4342 399
Malaysia 1616244 149732 22642
Bangladesh 1482628 35418 4698
Canada 1476149 18451 2525
Japan 1362813 160801 23698
Belgium 1173108 10386 3
Pakistan 1135858 26584 4199
Thailand 1120869 131010 18501
Sweden 1120628 6341 1278
Romania 1093924 4735 953
Portugal 1025869 16298 3062
Israel 1024100 58309 8800
Kazakhstan 829924 39719 0
Morocco 829137 47040 8008
Hungary 811517 736 180
Jordan 792278 5693 812
Switzerland 761831 13825 10
Nepal 752863 10635 0
Serbia 748693 12380 2327
UAE 712411 7322 983
Austria 675741 8678 1618
Tunisia 647483 15155 0
Cuba 611163 65888 8637
Lebanon 595522 8937 1593
Greece 570077 22891 3265
SaudiArabia 543028 2784 321
Georgia 532171 30874 4128
Ecuador 499196 2554 0
Bolivia 487721 3990 590
Belarus 472852 8997 1357
Paraguay 457971 948 133
Panama 453466 4542 480
CostaRica 447672 13591 2230
Bulgaria 446698 9371 1601
Guatemala 444924 22654 0
Kuwait 408797 1421 197
SriLanka 407768 34603 0
Azerbaijan 401828 24524 3794
Slovakia 394446 647 161
Uruguay 384287 782 106