Code the Rock Paper Scissors program:Get a move choice from playerA which must be R, P, S or r, p, s Loop until you get a valid move b.Get a move...
View the step-by-step solution to:

Question

1.    Code the Rock Paper Scissors program:

a.     Get a move choice from playerA which must be R,

P, S or r, p, s

Loop until you get a valid move

b.    Get a move choice from playerB in the same manner

c.     Display the results using the accepted phrases from the game

Rock breaks Scissors,

Paper covers Rock,

Scissors cuts Paper

and indicate the winner (Player A wins) or

Rock vs Rock it's a Tie! Etc...

d.    Prompt the user to play again [Y/N]

e.     Continue or terminate based on the user's choice.

I also need it to loop when the user enters something invalid.

This assignment is giving me so many errors I do not know how to fix.

Top Answer

Java code can be... View the full answer

rpsOutput.png

> javac RockPaperScissor . java
java RockPaperScissor
Enter choice (r/p/s) for player A : r
Enter choice (r/p/s) for player B : o
Plase enter valid input.
Enter choice (r/p/s) for player B : p...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question