Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need simple java solution Using JOptionPane. Time to play a game. Your job is to write a program that will let the user guess

I need simple java solution Using JOptionPane.

Time to play a game. Your job is to write a program that will let the user guess a number between 1 and 100 (inclusively).

  • If the users guess is higher than the random number, the program should display Your guess was too high, please try again.
  • If the users guess is lower than the random number, the program should display Your guess was too low, please try again.
  • If the user guesses the number correctly, the program should display Your guess was correct. It too you xxx guesses to get it correct.

Your program will have to create a random number from 1 to 1024 (inclusively) at the start of the program. You will have to keep track of the number of guesses and include it when the user guesses the number correctly.

Input and output should be done with Dialog and Message boxes.

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

Step: 3

blur-text-image

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions