Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is inside the countries.csv file Chad TCD N'Djamena 15477751 11302544205 137 Vietnam VNM Hanoi 95540395 2.45E+11 94 China CHN Beijing 1392730000 1.36E+13 79 Jamaica

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions