Question: IN JAVA Write a program to score the paper-rock-scissors game. Prompt the user to enter P, R, or S. Randomly generate an opposing selection (P,

IN JAVA

Write a program to score the paper-rock-scissors game. Prompt the user to enter P, R, or S. Randomly generate an opposing selection (P, R, or S). Print out the random selection. The program then announces the winner as well as the basis for determining the winner: Paper covers rock, Rock breaks scissors, Scissors cut paper, or Draw, nobody wins. The players must be able to enter either upper- or lower-case letters. If an invalid choice is entered, the player should be permitted to re-enter his choice up to 3 times (and then you announce an error and exit the program). When one game finishes, ask if the players want to continue (Y for yes, exit for anything else). A Y response means you play the game over again.

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!