Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. (DieGUI.java) Write a GUI that will allow you to simulate a Die. The GUI should take input from the user for the number of

image text in transcribed
3. (DieGUI.java) Write a GUI that will allow you to simulate a Die. The GUI should take input from the user for the number of sides of the Die and then it should create the Die accordingly. The GUI should then allow the user to roll the Die. It should display the number of times the Die has been rolled as a history of the numbers that have been rolled. If the user creates a new Die (maybe with a different number of sides) the GUI should reset the history and the number-of-rolls counter. Make sure to use the Die class, do not re-write the die functionality in your GUI If the user enters invalid data for number of sides for the Die, catch the exception and show and error in a JOptionPane. Keep track, somewhere on your GUI, of the frequency of each Die value that has come up so far *Your GUI does not have to look exactly as the one below but it should be close. Dice GUL!! Die options Roll history Note that creating a new die replaces the current one. New die Number of sides: New die: Die 20 sides, value 12 Create Roll # 1-> Value: 3 Roll # 2-, value: 18 Roll 3-3 Value: 14 Roll # 4-> Value: 12 Roll current die 011 # 5-> Value: 17

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

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

Determine the amplitude and period of each function.

Answered: 1 week ago

Question

4. Identify cultural variations in communication style.

Answered: 1 week ago

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago