Question: 3. JAVA PROGRAM Write a java program that asks the user to choose rock, paper, or scissors (or your own variants!) Then, it should repeat

3. JAVA PROGRAM

Write a java program that asks the user to choose rock, paper, or scissors (or your own variants!) Then, it should repeat back to the user their choice, it should "reveal" its own choice, and then report the results. The program can play fairly, can always win, or can always loseit's up to you. If RPS is unfamiliar, in the game of rock-paper- scissors, rock defeats scissors, scissors defeat paper, and paper defeats rock.

Game rules:

Rock beats/breaks scissors

Scissors beats/cuts paper

Paper beat/covers rock

You may assume that the user will input one of rock, paper, or scissors. Case matters! We'll stick with lower case

Hint: how can the program make a different decision of rock, paper, or scissors every run?

Here are some sample runs:

Choose your weapon: rock

The user (you) chose rock

The comp (I) chose scissors You win!

Choose your weapon: rock

The user (you) chose rock

The comp (I) chose rock You tied!

Choose your weapon: rock

The user (you) chose rock

The comp (I) chose paper You lose!

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!