subject

Part 1: Sorting Arrays Develop a program that asks the user to enter a capital for a U. S. state. Upon receiving the user input, the program reports whether the user input is correct. For this application, the 50 states and their capitals are stored in a two-dimensional array in order by state name. Display the current contents of the array then use a bubble sort to sort the content by capital. Next, prompt the user to enter answers for all the state capitals and then display the total correct count. The user's answer is not case-sensitive.
Part 2: Sorting & Searching HashMap
Now revise the code to store the pairs of each state and its capital in a Map using the HashMap function. Display the content of the Map, then use the TreeMap class to sort the map while using a binary search tree for storage. Next, your program should prompt the user to enter a state and it should then display the capital for the state.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
In a cellular network each cell is controlled by a tower what are these towers called?
Answers: 3
question
Computers and Technology, 22.06.2019 02:30
The can be used to paste text in any order
Answers: 1
question
Computers and Technology, 22.06.2019 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
Part 1: Sorting Arrays Develop a program that asks the user to enter a capital for a U. S. state. U...
Questions
question
Mathematics, 21.05.2021 21:20
question
Social Studies, 21.05.2021 21:20
question
History, 21.05.2021 21:20
Questions on the website: 13722361