Question: In this assignment, you will be processing a spreadsheet called world.csv. Each row represents a country. There are four fields: the name of the country,

In this assignment, you will be processing a spreadsheet called world.csv. Each row represents a country. There are four fields: the name of the country, the continent where this country is located, the population of the country, and its area (in square km). Note: world.csv has a comma (,) delimiter between the fields. You need to implement several methods to report the following statistics:

displayWorldPopulation() : compute and display the total world population

displayMostPopulatedCountry(): compute and display the worlds most populated country

displayLargestCountry(): compute and display the worlds largest country

displayContinentPopulationRandomly():compute and list worlds continents and their total population

displayContinentPopulationOrdered():compute and list worlds continents and their total population. Ordered by name.

displayContinentAreaRandomly(): compute and list the worlds continents and their total areas

displayContinentAreaOrdered(): compute and list the worlds continents and their total areas. Ordered by name.

DisplayContinentPopulationSorted(): display the continents by their populations, Largest first, smallest last.

displayMostPopulatedContinent(): compute and display the worlds most populated continent

displayLargestContinent(): compute and display the worlds largest continent

You will need to complete the implementation of the class and the constructor as well.

You are free to implement additional private methods if needed.

Hints:

You may create three classes: MyWorld7 (driver), ProcessMyWorld, and Country

You may use a combination of lists and maps.

Sample output (Output does not include the ordered listing)

The Total World Population is 7,256,726,949 people ---- ---- ---- The Most Populated Country is China 1,367,485,388 people ---- ---- ---- The Largest Country is Russia 17,098,242 Square km ---- ---- ---- Continent Name Continent Population South America 409,950,804 Central America 166,270,249 Asia 4,341,527,134 Europe 745,618,507 Africa 1,157,357,170 America 193,762 Antarctica 30 Australia 27,193,743 North America 398,659,117 Oceania 9,956,433 ---- ---- ---- Continent Name Continent Area South America 17,827,160 Central America 2,486,251 Asia 31,903,222 Europe 23,093,097 Africa 30,369,837 America 519 Antarctica 14,444,199 Australia 8,009,115 North America 22,219,232 Oceania 552,623 ---- ---- ---- The Most Populated Continent is Asia 4,341,527,134 people ---- ---- ---- The Largest Continent is Asia 31,903,222 square km

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!