Question
Write a program that lets the user play the game of Rock, Paper, and Scissors against the computer. The program works as follows. When a
Write a program that lets the user play the game of Rock, Paper, and Scissors against the computer. The program works as follows.
When a program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Computer choice should not be displayed.
The user enters his choice of rock, paper or scissors at the keyboard
The computer choice is displayed
The winner is selected according to the shown figure OR A tie when both choices have the same value
Be sure to divide the program into methods that perform each major task
Java
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