[Solved] Final Part Lab Ask Create Version Rock Paper Scissors Game Program Take User Input 0 1 2 R Q37297958
*** Language in Java ***

For the final part of the lab, we will ask you to create a version of rock-paper-scissors game. This program will take a user input of 0, 1, or 2, which represent “rock”, “paper”, or “scissors” respectively. You will then generate a random number for the computer between 0 and 2. Then, decide and print the winner of the game. 1. Create a method called int ToWord which takes as an argument an integer. Using a switch, return “rock” if the argument is O, “paper” for 1, and “scissors” for 2. If the integer is not 0, 1, or 2 print “invalid selection”. 2. Create a method findWinner which takes as arguments two integers: user and compchoice, and determines the winner. It should return one of three strings: “Tie.” “<compChoice> beats <userChoice>. I win. “cuserChoice> beats <compChoices. You win.” 3. Fill out the main method such that a user must choose a number, then the computer randomly generates a number between O and 2, and then on of the the following strings are printed by calling the methods you wrote previously “You chose <userChoice>. I choose <compChoice>, <winner» beats <loser». <winner» win.” or “You chose <userChoice>. I choose <compChoice>. Tie.” e.g. “You chose rock. I chose paper. paper beats rock. I win.” e.g. “You chose paper. I chose paper. Tie.” e.g. “You chose paper. I chose rock. paper beats rock. You win.” Show transcribed image text For the final part of the lab, we will ask you to create a version of rock-paper-scissors game. This program will take a user input of 0, 1, or 2, which represent “rock”, “paper”, or “scissors” respectively. You will then generate a random number for the computer between 0 and 2. Then, decide and print the winner of the game. 1. Create a method called int ToWord which takes as an argument an integer. Using a switch, return “rock” if the argument is O, “paper” for 1, and “scissors” for 2. If the integer is not 0, 1, or 2 print “invalid selection”. 2. Create a method findWinner which takes as arguments two integers: user and compchoice, and determines the winner. It should return one of three strings: “Tie.” ” beats . I win. “cuserChoice> beats
Expert Answer
Answer to For the final part of the lab, we will ask you to create a version of rock-paper-scissors game. This program will take a… . . .
OR

