Menu

[Solved]Create Population Database App Create Java Db Database Named Citydb Citydbdatabase Table C Q37160840

Create a Population Database app that will create a Java DBdatabase named CityDB. The CityDBdatabase willhave a table called City, with the following columns:

Column Name

Data Type

CityName

CHAR (50) Primary Key

Population

DOUBLE

The CityName column stores the name of a city and thePopulation column stores the current population of that city. Usethe Internet to locate accurate and up to date data points, such asthe US Census. Create at least 10 cities and their populations.Remember to use int for the population column type so youcan easily perform math and other common methods for manipulatingnumeric type data.

Write a Java app that connects to the database and allows theuser to select any of the following operations:

  • Sort the cities of population in ascending order
  • Sort the list of cities by population in descending order
  • Sort the list of cities by name
  • Get the total population of all cities
  • Get the average population of all cities
  • Get the highest population
  • Get the lowest population
  • Get the top 5 cities with the smallest populations, and thensort those records in reverse alphabetical order

Cities and their populations:

New York City, New York   8,601,186

Philadelphia, Pennsylvania 1,576,596

Salem, Oregon   177,019

Salt Lake City, Utah   200,662

Las Vegas, Nevada   664,304

Chicago, Illinois   2,679,044

Buffalo, New York   252,902

Tampa, Florida   403,178

San Diego, California   1,453,775

Louisville, Kentucky   620,800

Expert Answer


Answer to Create a Population Database app that will create a Java DB database named CityDB. The CityDBdatabase will have a table … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *