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: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 14:00
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
question
Computers and Technology, 25.06.2019 06:00
Write a method public static string getdigits(string phonenumber) that takes an 11-character phone number written with any combination of 11 uppercase letters, lowercase letters and/or digits, and zero or more hyphens, and which returns the digits that a person would have to press on a cell phone to dial that phone number. we will use the mapping of letters to digits given at en.wikipedia.org/wiki/telephone_keypad# /media/file: telephone-keypad2.svg you may assume that the string parameter phonenumber contains some combination of exactly 11 uppercase letters, lowercase letters and/or digits, but that any number of hyphens may be present. you can assume that a hyphen will not appear as the first or last character of the string. do not assum
Answers: 3
question
Computers and Technology, 25.06.2019 08:20
The control unit takes ths instructions fetched by the preteched unit and translates them into a form that can be understood by
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, 11.11.2020 22:30
question
Mathematics, 11.11.2020 22:30
Questions on the website: 13722362