Question: //Using java language programming //Using while loop of you want to! Write a complete Java program that implements a game of Rock, Paper, scissors between

//Using java language programming
//Using while loop of you want to!  //Using java language programming //Using while loop of you want to!

Write a complete Java program that implements a game of Rock, Paper, scissors between a user and the computer. Print out a prompt and have the program give the player the following menu: 1. Rock Paper Scissors After reading in a number from the keyboard, use a selection structure to set the player's choice to one of the strings "Rock", "Paper", or "Scissors". (For example, if(user_num1) user_selection "Rock"; ) Use the Java Random class to generate a random integer in the range 1-3 for the computer's turn, then use another decision structure to set the computer's choice to one of the three strings. Finally, using some combination of decision structures, decide the winner of the game using the following rules: Rock crushes scissors Scissors cut paper Paper covers rock (Rock wins) (Scissors wins) (Paper wins) Inform the user of the player choices, the rule used, and tell the user who won (the user or the computer). If the computer chose the same as the user, say it s a draw

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!