Homework 02

Rock Paper Scissors!

Due 09/27/2024 by 11:55PM

Due 10/11/2024 by 11:55PM

 

 

Objective:

 

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

 

Requirements:

 

Example Dialog:

*The following Example Dialog demonstrates the interactions between a user and ONE possible implementation of the required software’s front-end / user interface. The software’s front-end / user interface may be implemented in MANY different ways and will receive full credit as long as it meets the most minimal of the above requirements. While you may use the example dialog as a guide, it is strongly encouraged to create the front-end / user interface in your own way. *

Key

Unhighlighted Text

Program’s Output

Highlighted Text

User’s Input

 

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 CSCE Dropbox