Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help writing a rock paper scissors game in Java using the arrow syntax for the switch statement ( example case 1 - >
I need help writing a rock paper scissors game in Java using the arrow syntax for the switch statement example case not the full rule syntax for the switch statement example case : Again use the arriw syntax case nit the full rule syntax case : The orogram should use methods frim the JOptionPane class. The program should ask the player to make their selection from the dialog box. The dialog box should have buttons with buttons. One button should say Rock, one should say Paper, and the other should say Scissors. It should say click a button corresponding to your pkay. The player will click a button. A dialog box will display what the player selected. Next the program will generate a choice for the computer. Once the computers choice is generated the program should translate the computers choice. Next the program should display a dialog box with the results. Example is "You chose scissors. The computer chose paper. Scissors cut paper. Yoy win!". There should be options for results. Paper wraps rock when the player wins or the computer wins; Rock crushes scissors when the player wins or computer wins; Scissors cut paper when the player wins or the computer wins. The final dialog box should display the final score of the game by saying Wins: Loses: Ties: The program should have a loop to repeat the game for rounds before ending the game. Again the program should use the arrow syntax case not the full rule syntax case : for the switch statement.
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