Homework 04

Rock Paper Scissors!

10/6/2017 at 11:55 PM

 

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:

 

 

Example Dialog:

 

Welcome to Rock Paper Scissors!  Best 2 out of 3!

Enter "Rock", "Paper", or "Scissors"

Rock

Rock v Paper! Computer Wins!

Player has won 0 times and the computer has won 1 times

Enter "Rock", "Paper", or "Scissors"

Rock

Rock v Paper! Computer Wins!

Player has won 0 times and the computer has won 2 times

Enter "Rock", "Paper", or "Scissors"

Rock

Rock v Scissors! Player Wins!

Player has won 1 times and the computer has won 2 times

The Computer Wins!

Play again? "Yes" or "No"

Yes

 

Enter "Rock", "Paper", or "Scissors"

Paper

Paper v Paper! Tie!

Player has won 0 times and the computer has won 0 times

Enter "Rock", "Paper", or "Scissors"

Paper

Paper v Paper! Tie!

Player has won 0 times and the computer has won 0 times

Enter "Rock", "Paper", or "Scissors"

Paper

Paper v Rock! Player Wins!

Player has won 1 times and the computer has won 0 times

The Player wins!

Play again? "Yes" or "No"

Yes

 

Enter "Rock", "Paper", or "Scissors"

Purple

Not a valid input! Computer wins

Player has won 0 times and the computer has won 1 times

Enter "Rock", "Paper", or "Scissors"

Banana

Not a valid input! Computer wins

Player has won 0 times and the computer has won 2 times

Enter "Rock", "Paper", or "Scissors"

Paper

Paper v Paper! Tie!

Player has won 0 times and the computer has won 2 times

The Computer Wins!

Play again? "Yes" or "No"

No

Goodbye!

 

Finally:

Upload the .java file to the dropbox