Sample Data Problem 1 Usa 203 Washington Albania 132 Tirana Afghanistan 111 Kabul Barbados Q43875358
| SAMPLE DATA FOR PROBLEM 1 USA 203 Washington Albania 132 Tirana Afghanistan 111 Kabul Barbados 97 Bridgetown Bahrain 123 Manama Problem 1 (15 points) – Problem Statement Write a Java program that prompts the user to enter information about countries. The data for a country is to include the following information: 1. the country name; 2. the country population; 3. the capital city for the given country. Your program is to do the following: 1. prompt the user, asking how many countries will be entered; 2. prompt and store the data for each country, (the number of countries to be entered being that given in step 1 above; 3. display the name of the country with the largest population 4. display the name of the country with the smallest population; 5. sort the list of country information by population; 6. display the data for each country in order from least to greatest population. If the user were to enter the above data, the program would prompt the user in the following way: How many countries will be entered: 5 Please enter the country name: enter name Please enter the country population: enter population value Please enter the country capital: enter capital The country with the largest population is USA The country with the smallest population is Barbados In order of least to greatest population size, the countries are: Barbados Afghanistan Bahrain Albania USA Note: to receive credit, your solution may only use Programming I techniques. The data types for the names are to be of type String, and the data type for the population is to be of type integer. Show transcribed image text | SAMPLE DATA FOR PROBLEM 1 USA 203 Washington Albania 132 Tirana Afghanistan 111 Kabul Barbados 97 Bridgetown Bahrain 123 Manama Problem 1 (15 points) – Problem Statement Write a Java program that prompts the user to enter information about countries. The data for a country is to include the following information: 1. the country name; 2. the country population; 3. the capital city for the given country. Your program is to do the following: 1. prompt the user, asking how many countries will be entered; 2. prompt and store the data for each country, (the number of countries to be entered being that given in step 1 above; 3. display the name of the country with the largest population 4. display the name of the country with the smallest population; 5. sort the list of country information by population; 6. display the data for each country in order from least to greatest population. If the user were to enter the above data, the program would prompt the user in the following way: How many countries will be entered: 5 Please enter the country name: enter name Please enter the country population: enter population value Please enter the country capital: enter capital The country with the largest population is USA The country with the smallest population is Barbados In order of least to greatest population size, the countries are: Barbados Afghanistan Bahrain Albania USA Note: to receive credit, your solution may only use Programming I techniques. The data types for the names are to be of type String, and the data type for the population is to be of type integer.
Expert Answer
Answer to | SAMPLE DATA FOR PROBLEM 1 USA 203 Washington Albania 132 Tirana Afghanistan 111 Kabul Barbados 97 Bridgetown Bahrain 1…
OR