Question: In this problem, you'll play a simple rock, paper, scissors game. First, you'll ask the user to pick rock, paper, or scissors. Then, you'll have

 In this problem, you'll play a simple rock, paper, scissors game.First, you'll ask the user to pick rock, paper, or scissors. Then,you'll have the computer randomly choose one of the options. You should

In this problem, you'll play a simple rock, paper, scissors game. First, you'll ask the user to pick rock, paper, or scissors. Then, you'll have the computer randomly choose one of the options. You should use the Randomizer class that you created in the last exercise to help the computer make a choice. After that, print out the winner! You should keep playing the game until the user hits enter. Note: You'll need to implement a method called String getWinner(String user, String computer) that determines whether the user or computer won the game, and return the correct winner! Here is a sample run of the program. Enter your choice (rock, paper, or scissors):rock User: rock Computer: paper Computer wins! Enter your choice (rock, paper, or scissors): paper User: paper Computer: scissors Computer wins! Enter your choice (rock, paper, or scissors):scissors User: scissors Computer: paper User wins! Enter your choice (rock, paper, or scissors) :rock User: rock Computer: rock Tie Enter your choice (rock, paper, or scissors): Thanks for playing! public class Randomizer public class RockPaperScissors E

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!