Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

| SAMPLE DATA FOR PROBLEM 1 USA 203 Washington Albania 132 Tirana Afghanistan 111 Kabul Barbados 97 Bridgetown Bahrain 123 Manama Problem 1 (15 points)

image text in transcribed

| 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

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago