Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA, show output screenshot pls (Guessing the capitals) Rewrite Programming Exercise 8.37 to store the pairs of states and capitals so that the questions are

JAVA, show output screenshot pls

image text in transcribed

(Guessing the capitals) Rewrite Programming Exercise 8.37 to store the pairs of states and capitals so that the questions are displayed randomly *20.3 8.37 ( Gue ss the capitals) Write a program that repeatedly prompts the user to enter apital for a state. Upon receiving the user input, the program reports whether a c the answer is correct. Assume that 50 states and their capitals are stored in a two-dimensional array, as shown in Figure 8.10. The program prompts the user to answer all states capitals and displays the total correct count. The user's answ is not case-sensitive. er Alabama Alaska Arizona Montgomery Juneau Phoenix FIGURE 8.10 A two-dimensional array stores states and their capitals. Here is a sample run: What is the capital of A1abama? Montogomery eter The correct answer should be Montgomery What is the capital of Alaska? Juneau Your answer is correct What is the capital of Arizona? The correct count is 35

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Bachelors degree in Information Systems or Statistics

Answered: 1 week ago