Question
Program 3: Rock.java You are to write a program that will simulate a game of Rock, Paper, Scissors. One of the two players will
Program 3: Rock.java You are to write a program that will simulate a game of Rock, Paper, Scissors. One of the two players will be the computer. The program will start by asking how many winning rounds are needed to win the game. Each round will consist of you asking the user to pick between rock, paper, and scissors. Internally you will get the computers choice by using a random number generator. Rock beats Scissors, Paper beats Rock, and Scissors beats Paper. You will report the win, loss, or tie and continue with another round. Repeating until either the user or the computer has won the correct number of times first. Please output what the user and computers choice is each time and give a running score total as the game goes on. Sample output shown. Example of Output for Rock.java Welcome to my game of Rock, Paper, Scissors! How many winning rounds are needed for victory? :3 Round# 1 Enter 0-rock, 1-paper, 2=scissors:0 Human : Rock Computer : Rock Draw, try again Total Score: Human 0 Computer 0 Round# 2 Enter 0=rock, 1-paper, 2=scissors:1 Human : Paper Human wins this Total Score: Round# 3 Computer : Rock round Human 1 Computer 0 Enter 0=rock, 1=paper, 2=scissors:2 M Human: Scissors Human wins this round Computer : Paper Total Score: Human 2 Computer 0 M Round# 4 Enter 0=rock, 1-paper, 2=scissors:0 Human : Rock Computer : Rock Draw, try again Total Score: Human 2 Computer 0 Round# 5 Enter 0-rock, 1-paper, 2-scissors:0 M Human : Rock Computer : Scissors Human wins this round Total Score: Human 3 Computer 0 It took 5 rounds, but you won! Goodbye, play again sometime
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started