Question
Java Program Rock-Paper-Scissors: Write a program that plays the Rock-Paper-Scissors game against the computer. In the game, Rock beats Scissors, Scissors beats Paper, and Paper
Java Program Rock-Paper-Scissors:
Write a program that plays the Rock-Paper-Scissors game against the computer. In the game, Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. The program should randomly choose one of the three options (without revealing it), then prompt for the user's selection. At that point, the program reveals both choices and prints a statement indicating if the user won, the computer won, or if it was a tie. Continue playing until the user chooses to stop, then print the number of user wins, losses, and ties.
Assign 1 to rock, 2 to paper, and 3 to scissors.
Place seed =1 in your random number generator: Random generator = new Random(1)
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