Rewrite Programming Exercise 8.37? to store pairs of each state and its capital in a map. Your
Question:
Rewrite Programming Exercise 8.37?to store pairs of each state and its capital in a map. Your program should prompt the user to enter a state and should display the capital for the state.
Write a program that repeatedly prompts the user to enter a capital for a state. Upon receiving the user input, the program reports whether the answer is correct. Assume that?50?states and their capitals are stored in a two dimensional array, as shown in Figure. The program prompts the user to answer all states? capitals and displays the total correct count. The user?s answer is not case-sensitive.
Here is a sample run:
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted: