Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
