Exercise: Rock Paper Scissors

Write a console program that plays a single round of the game "rock paper scissors". The program should: For example (user input in green):
Choose between Rock, Paper, and Scissors:
Rock
You chose Rock. CPU chose: Scissors
You win!
Thanks for playing!

You can use Wikipedia to remind yourself of the rules of Rock Paper Scissors.

Hint 💡

Use the equals method to compare strings. For example:
if (userChoice.equals("Rock")) {
  // Do something
}

Hand in instructions

  1. Make sure your program runs correctly.
  2. Hand in your program by uploading Main.java to Moodle.