
Population
Make sure you have downloaded the hook’s source code from the companion Web site at www.pearson.com/gaddis. In this chapter’s source code folder you will find a
DB or Apache Derby database named CityDB. The CityDB database will have a table named 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 the Population column stores the population of that city. After you run the CreateCityDB.java program, the City table will contain 20 rows with various cities and their populations.
Next, write a program that connects to the CityDB database, and allows the user to select any of the following operations:
- Sort the list of cities by 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 the cities.
- Get the average population of all the cities.
- Get the highest population.
- Get the lowest population.

Want to see the full answer?
Check out a sample textbook solution
Chapter 17 Solutions
Starting Out with Java: From Control Structures through Objects (6th Edition)
Additional Engineering Textbook Solutions
Mechanics of Materials (10th Edition)
Starting Out with C++: Early Objects (9th Edition)
SURVEY OF OPERATING SYSTEMS
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out with Python (4th Edition)
- Design and draw a high-level "as-is" process diagram that illustrates a current process related to a product or service offered through the SSDCI.gov database.arrow_forwardCompare last-mile connections for connecting homes and businesses to the Internetarrow_forwardExplain wireless networking standardsarrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L


