Write a program that simulates a game of rock paper


Problem 1:

Objective:

Write a program that simulates a game of rock, paper, scissors between a human and the computer in best 2 out of 3 rounds.

Requirements:

1. The player can enter "rock", "paper", or "scissors".

  • If the player enters anything other than that the computer automatically gets a point

2. The computer randomly selects one of the gestures

  • Use the Random type to make this easier
  • Also make sure you import java.util.Random
  • You can use randomly selected integers to represent the gestures

3. For each combination either the computer scores a point, the player scores a point, or they score neither on draws.

  • Rock vs Paper = Paper wins
  • Paper vs Scissors = Rock wins
  • Scissors vs Rock = Rock wins

4. After 3 rounds the winner or a tie is declared

5. The player is then asked whether or not they want to play again, and if they do the whole pocess starts over.

Attachment:- Screen Shot 2015-09-13 at 9.19.27 PM.png

Solution Preview :

Prepared by a verified Expert
Database Management System: Write a program that simulates a game of rock paper
Reference No:- TGS01121832

Now Priced at $50 (50% Discount)

Recommended (90%)

Rated (4.3/5)