Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Using inner class discussed in class ,simulate that you are playing Pega4: The program should continue running until it happensone of these two situations

Java

Using inner class discussed in class ,simulate that you are playing Pega4:

  • The program should continue running until it happensone of these two situations :
  • 1. Press Ok on the JOptionPane ( if you press the button it should say " You lost !!!").
  • 2. If the number entered comes out on Paste4, it must say You won !.

They must implement an interface called ask () . Which will ask for the desired number.

The interval that is every 1 second and that makes a "beep" . Show how many rolls were made.

Note : To investigate how to generate numbers at the chance . Remember that Pega4 goes from 1000 to 9999.

The output would be as follows :

-------------------------------------------------- -------------------------------------------------

Enter desired number: 3267

07/09/2019 09:50:23:

shot # 1: 4392

roll #2: 8391

You lost !!!

-------------------------------------------------- -------------------------------------------------

Enter desired number: 4912

07/09/2019 09:50:23:

shot # 1: 4931

roll #2: 9450

roll #3: 4912

Won !!!

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago