Menu

(Solved) : Inside Countriescsv File Chad Tcd N Djamena 15477751 11302544205 137 Vietnam Vnm Hanoi 955 Q44109015 . . .

Requirements: 1. Create a class named Country that will store information about a country and provide methods to get, and set
This is inside the countries.csv file
Chad TCD N’Djamena 15477751 11302544205 137Vietnam VNM Hanoi 95540395 2.45E+11 94China CHN Beijing 1392730000 1.36E+13 79Jamaica JAM Kingston 2934855 15717858487 76Somalia SOM Mogadishu 15008154 7484000000 93Turkey TUR Ankara 82319724 7.67E+11 69Germany DEU Berlin 82927922 4.00E+12 16North Cyprus CYP Nicosia 326000 3685000000 61Croatia HRV Zagreb 4089400 60805659436 77Luxembourg LUX Luxembourg 607728 69487922619 18Angola AGO Luanda 30809762 1.06E+11 140Kenya KEN Nairobi 51393010 87908262520 112Mali MLI Bamako 19077690 17196688920 127Nigeria NGA Abuja 195874740 3.97E+11 95United Kingdom GBR London 66488991 2.83E+12 19Serbia SRB Belgrade 6982084 50508366850 73Latvia LVA Riga 1926542 34849078086 54Democratic Republic of the Congo COD Kinshasa 8406809147227535291 124Portugal PRT Lisbon 10281762 2.38E+11 89Niger NER Niamey 22442948 9239513530 135Russian Federation RUS Moscow 144478050 1.66E+12 49Tanzania TZA Dodoma 56318348 57437073927 153Slovenia SVN Ljubljana 2067372 54235484383 62Iran IRN Tehran 81800269 1.54E+12 108Liberia LBR Monrovia 4818977 3249000000 148Dominican Republic DOM Santo Domingo 10627165 8129858540386Cambodia KHM Phnom Penh 16249798 24571753583 129Botswana BWA Gaborone 2254126 18616018903 142Ivory Coast CIV Yamoussoukro 23740424 1.06E+11 128New Zealand NZL Wellington 4885500 2.05E+11 8Poland POL Warsaw 37978548 5.86E+11 46Belarus BLR Minsk 9485386 59662495092 67Uzbekistan UZB Tashkent 32955400 50499920318 47Japan JPN Tokyo 126529100 4.97E+12 51Panama PAN Panama City 4176873 65055100000 30Ireland IRL Dublin 4853506 3.76E+11 15Australia AUS Canberra 24992369 1.43E+12 10Tajikistan TJK Dushanbe 9100837 7522947810 96Cyprus CYP Nicosia 1189265 24469841832 65Kuwait KWT Kuwait City 4137309 1.42E+11 39Austria AUT Vienna 8847037 4.56E+11 13Slovak Republic SVK Bratislava 5447011 1.06E+11 40India IND New Delhi 1352617328 2.73E+12 122Mozambique MOZ Maputo 29495962 14457964381 113Spain ESP Madrid 46723749 1.43E+12 34United Arab Emirates ARE Abu Dhabi 9630959 4.14E+11 21Finland FIN Helsinki 5518050 2.76E+11 5Yemen YEM Sanaa 28498687 26914402224 146Guatemala GTM Guatemala City 17247807 78460447920 29Cameroon CMR Yaounde 25216237 38502059858 107Switzerland CHE Berne 8516543 7.06E+11 4Saudi Arabia SAU Riyadh 33699947 7.82E+11 37Sweden SWE Stockholm 10183175 5.51E+11 9Zambia ZMB Lusaka 17351822 26720073436 116Burkina Faso BFA Ouagadougou 19751535 14441763759 134Kazakhstan KAZ Astana 18276499 1.71E+11 60Montenegro MNE Podgorica 622345 5452173041 83France FRA Paris 66987244 2.78E+12 31Sudan SDN Khartoum 41801533 40851536134 130Guinea GIN Conakry 12414318 10989790256 149Lesotho LSO Maseru 2108132 2791762880 139Peru PER Lima 31989256 2.22E+11 63Ghana GHA Accra 29767108 65556464056 131Namibia NAM Windhoek 2606971 27505000000 111Estonia EST Tallinn 1320884 30284890757 66Belgium BEL Brussels 11422068 5.32E+11 17Iraq IRQ Baghdad 38433600 2.26E+11 117Italy ITA Rome 60431283 2.07E+12 48Paraguay PRY Asuncion 6956071 40842341774 70Argentina ARG Buenos Aires 44494502 5.18E+11 24Costa Rica CRI San Jose 4999441 60126014829 12Pakistan PAK Islamabad 212215030 3.13E+11 80Mexico MEX Mexico City 126190788 1.22E+12 25Malawi MWI Lilongwe 18143315 7064971176 136Ukraine UKR Kiev 44622516 1.31E+11 132Bangladesh BGD Dhaka 161356039 2.74E+11 110United States USA Washington 327167434 2.05E+13 14South Sudan SSD Juba 10975920 18435000000 147Thailand THA Bangkok 69428524 5.05E+11 32Honduras HND Tegucigalpa 9587522 23803230473 91Greece GRC Athens 10727668 2.18E+11 87Rwanda RWA Kigali 12301939 9509003197 151Afghanistan AFG Kabul 37172386 19362969582 141Hong Kong of China HKG Hong Kong 7451000 3.63E+11 71Lebanon LBN Beirut 6848925 56639155556 88Bulgaria BGR Sofia 7024216 65132951116 105Turkmenistan TKM Ashgabat 5850908 40761142857 59Nepal NPL Kathmandu 28087871 28812491892 99Colombia COL Bogota 49648685 3.30E+11 36Algeria DZA Algiers 42228429 1.81E+11 53Uganda UGA Kampala 42723139 27476945526 133Nicaragua NIC Managua 6465513 13117859222 43Mongolia MNG Ulan Bator 3170208 13009574621 100Azerbaijan AZE Baku 9942334 46939529412 85Philippines PHL Manila 106651922 3.31E+11 72Venezuela VEN Caracas 28870195 76458000000 82South Africa ZAF Pretoria 57779622 3.66E+11 101Qatar QAT Doha 2781677 1.92E+11 35Canada CAN Ottawa 37058856 1.71E+12 7Indonesia IDN Jakarta 267663435 1.04E+12 81Israel ISR Jerusalem 8883800 3.70E+11 11Togo TGO Lome 7889094 5300214337 150Egypt EGY Cairo 98423595 2.51E+11 104Trinidad and Tobago TTO Port of Spain 1389858 2341035343538Albania ALB Tirana 2866376 15058879129 109Moldova MDA Chisinau 3545883 11309082555 56Singapore SGP Singapur 5638676 3.64E+11 26Belize BLZ Belmopan 408487 3343000000 50Jordan JOR Amman 9956011 42290832158 74Benin BEN Porto-Novo 11485048 10358985583 143Syrian Arab Republic SYR Damascus 16906283 50280000000152Morocco MAR Rabat 36029138 1.18E+11 84Tunisia TUN Tunis 11565204 39860715814 102Kosovo XKX Pristina 1845300 7900268736 78Sri Lanka LKA Colombo 21670000 88900770858 120Hungary HUN Budapest 9768785 1.56E+11 75Denmark DNK Copenhagen 5797446 3.51E+11 2Palestinian Territories PSE East Jerusalem 4550000 14500000000103Macedonia MKD Skopje 2103721 33822000000 92Gabon GAB Libreville 2119275 17017401832 118Netherlands NLD Amsterdam 17231017 9.13E+11 6Romania ROU Bucharest 19473936 2.40E+11 57El Salvador SLV San Salvador 6420744 26056950000 45Burundi BDI Bujumbura 11175378 3078029929 154Mauritania MRT Nouakchott 4403319 5365868725 123Mauritius MUS Port Louis 1265303 14220348673 64Central African Republic CAF Bangui 4666377 2379716827155Iceland ISL Reykjavik 353574 25878475760 3Bahrain BHR Manama 1569439 37746196809 41Republic of the Congo COG Brazzaville 5244363 11263682694126Libya LBY Tripolis 6678567 48319620013 68Malaysia MYS Kuala Lumpur 31528585 3.54E+11 42Norway NOR Oslo 5314336 4.35E+11 1Madagascar MDG Antananarivo 26262368 12100459087 144Armenia ARM Yerevan 2951776 12433089919 121Sierra Leone SLE Freetown 7650154 3999945202 106Myanmar MMR Nay Pyi Taw 53708395 71214803378 114Lithuania LTU Vilnius 2789533 53251369047 52Senegal SEN Dakar 15854360 24129599552 115Georgia GEO Tbilisi 3731000 16209818081 125Kyrgyz Republic KGZ Bishkek 6315800 8092836609 98Brazil BRA Brasilia 209469333 1.87E+12 22Malta MLT Valletta 483530 14542039605 27Uruguay URY Montevideo 3449299 59596885024 28Bolivia BOL Sucre 11353142 40287647757 58Ethiopia ETH Addis Ababa 109224559 84355462494 119Bosnia and Herzegovina BIH Sarajevo 3323929 1978177610190South Korea KOR Seoul 51709098 2.24E+12 55Taiwan Province of China TWN Taipei 23577271 1.31E+12 33Chile CHL Santiago 18729160 2.98E+11 20Czech Republic CZE Prague 10625695 2.44E+11 23Haiti HTI Port-au-Prince 11123176 9658084644 145Ecuador ECU Quito 17084357 1.08E+11 44Bhutan BTN Thimphu 754394 2534965163 97Zimbabwe ZWE Harare 14439018 31000519447 138
This program should be written in javaRequirements: 1. Create a class named Country that will store information about a country and provide methods to get, and set the data, and compare the countries by several fields. a. Fields: Name, Code, Capitol, Population, GDP, Happiness Rank b. Constructor c. Get and set methods for each field d. Compare method to compare based on Name (expects a Country object as a parameter) e. Method to print a country object 2. Create a class named Project that will: a. Prompt user to enter the name of the CSV file, e.g., Countries1.csv, as input to the system. b. Parse Countries 1.csv and create an array of country objects containing the data in the file. c. Offer the user the following options: 1) Print a countries report 2) Sort by Name (using Bubble sort) 3) Sort by Happiness Rank (using Selection sort) 4) Sort by GDP per capita (using Insertion sort) 5) Find and print a given country (using binary search if the data is sorted by name, sequential search if not) 6) Quit d. Implement the given option, then prompt again. (deal with invalid choice) Project 1 should have main and methods for each option 1-5. e. The Country report in option 1 should be in this form: Name Code Capitol Population GDP HappinessRank 137 Chad Vietnam TCD VNM N’Djamena Hanoi 15477751 95540395 11302544205 2.45E+11 94 Show transcribed image text Requirements: 1. Create a class named Country that will store information about a country and provide methods to get, and set the data, and compare the countries by several fields. a. Fields: Name, Code, Capitol, Population, GDP, Happiness Rank b. Constructor c. Get and set methods for each field d. Compare method to compare based on Name (expects a Country object as a parameter) e. Method to print a country object 2. Create a class named Project that will: a. Prompt user to enter the name of the CSV file, e.g., Countries1.csv, as input to the system. b. Parse Countries 1.csv and create an array of country objects containing the data in the file. c. Offer the user the following options: 1) Print a countries report 2) Sort by Name (using Bubble sort) 3) Sort by Happiness Rank (using Selection sort) 4) Sort by GDP per capita (using Insertion sort) 5) Find and print a given country (using binary search if the data is sorted by name, sequential search if not) 6) Quit d. Implement the given option, then prompt again. (deal with invalid choice) Project 1 should have main and methods for each option 1-5. e. The Country report in option 1 should be in this form: Name Code Capitol Population GDP HappinessRank 137 Chad Vietnam TCD VNM N’Djamena Hanoi 15477751 95540395 11302544205 2.45E+11 94

Expert Answer


Answer to This is inside the countries.csv fileChad TCD N’Djamena 15477751 11302544205 137Vietnam VNM Hanoi 95540395 2.45E+11 94Ch…

OR