Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java Using ***Net Beans*** Write a program that lets the user play the game of Rock, Paper, Scissors against the Computer. Thank you Your
In Java Using ***Net Beans***
Write a program that lets the user play the game of Rock, Paper, Scissors against the Computer. Thank you
Your program should have the following: Make the name of the project RockPaperScissors Write a method that generates a random number in the range of 1 through 3. The randomly generated number will determine if the computer chooses rock, paper, or scissors. 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. Return the computer's choice. (5 points) Write another method where the user enters his or her choice of rock, "paper", or "scissors. You can use command line or message box. You can choose to have the user type the word or use a menu choice. If the user does not enter a valid choose, prompt them for the choice again (You can do this inside of this method or create another method to do the validation). Return the user's choice. (6 points) Write another method to determine the winner and display the results. Write conditionals to determine the winner. If one player chooses rock and the other player choose scissors, then rock wins. (Rock smashes scissors). If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cut paper). If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) If both players make the same choice, the game must be played again to determine the winner. Display the computer's choice, the user's choice, and whether or not the computer or the user won/tied. (5 points) In the main method, call the method that generates the computer's choice and save this choice in a variable. Call the method to get the user's choice and save in a variable. Call the method to determine the winner and display results method (You will need to use a loop to repeat this method if the computer and the user choices were tied). (4 points)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