Question
write a program that simulates the childhood arcade game, Wac-A-Mole, using the Java Swing GUI. program may be a JApplet or you can use the
write a program that simulates the childhood arcade game, Wac-A-Mole, using the Java Swing GUI. program may be a JApplet or you can use the JFrame-based GUI.
There should be an image too like a monkey or something. I am really stuck on the timer thing
Please help and if it's in applet it will be really helpful to understand for my remaining practice programs....thanks :)
program should use multiple layout managers to provide a label that presents information to the user (including the final score) at the top, a 5x5 grid of buttons for the playing area in the center, and a play again button at the bottom that is enabled only when the game is over.
program should use a random generator to randomly select which button will display the mole icon. Each time the correct button is selected 5 points are earned.
program should use timers to control when to change the Moles position on the playing area every 2 seconds, unless the correct button is clicked in which the Moles position is changed immediately and the timer is restarted, and the overall game timer which limits each game to 30 seconds. These timers, and the buttons, should trigger listener events that are handled appropriately by listener method(s) you define.
Once the game finishes, all buttons should be blank (no icon) and the total points should be displayed in the label.
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