Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an interactive Java program. Write a number guessing game program. Ask the player how many games they would like to play. Then ask the

Write an interactive Java program. Write a number guessing game program. Ask the player how many games they would like to play. Then ask the player to pick a difficulty level for the games. Easy:1-5, Normal: 1-10, Hard: 1-100. Prompt the user to start guessing numbers, giving them hints as to whether they are to hi or low along the way. Keep up with the total number of guesses taken for a match summary after all games complete. It should look something like this:

How many games would you like to play: 2 Would you like the games to be easy, normal, or hard: normal Guess a number between 1-10: 5 To high. Guess again: 3 Correct! Guess a number between 1-10: 5 To low. Guess again: 7 To high. Guess again: 6 Correct! It took you 5 guess to win 2 games, Congratulations! It took you an average of 2.5 guesses per game!

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions