Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA!!!!!! Using the inner class discussed in class, simulate that you are playing Pega 5 : The program should continue to run until one of
JAVA!!!!!! Using the inner class discussed in class, simulate that you are playing Pega:
The program should continue to run until one of two situations occurs:
Press Ok from the JOptionPane if you press the button it should say "You lost
If the entered number comes out in Pega it should say You won!.
They must implement an interface called ask Which will ask the desired number.
The interval that is every second and that makes a "beep". Show how many rolls were made.
Note: Investigate how to generate random numbers. Remember that Pega goes from to
The output would be as follows:
Enter desired number:
:::
Spin #:
Spin #:
You lost
Enter desired number:
::
Spin #:
Roll #:
Spin #:
You won
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started