Question: JAVA!!!!! Using the inner class discussed in class, simulate that you are playing Pega5: The program should continue to run until one of two situations
JAVA!!!!! Using the inner class discussed in class, simulate that you are playing Pega5: The program should continue to run until one of two situations occurs: 1. Press Ok from the JOptionPane (if you press the button it should say "You lost II!") . 2. If the entered number comes out in Pega5, it should say You won!. They must implement an interface called ask(). Which will ask the desired number. The interval that is every 1 second and that makes a "beep". Show how many rolls were made. Note: Investigate how to generate random numbers. Remember that Pega5 goes from 00000 to 99999. The output would be as follows
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
