Question: You will be creating only a driver class in netbeans/java. As part of writing this Rock-Paper-Scissors program, be sure to include a message to the

You will be creating only a driver class in netbeans/java. As part of writing this Rock-Paper-Scissors program, be sure to include a message to the user explaining the program. Also, there is one additional element required in this program. You must validate the data entered by the user to ensure that his/her choice is one of the three allowed options. If bad data is entered, the program must provide feedback about the error and again prompt for and read in the users choice. make the program randomly generate rock paper or scissors(1,2, or 3). include clear comments throughout the program that explain what functionality the various lines/small sections of code/methods are as related to the execution of the program.

Sample output

Welcome to Rock, Paper, Scissors! Please enter your choice from the following menu Rock - 1, Paper - 2, Scissors - 3 : 1 Your choice is Rock My choice is Paper You lose! Would you like to play another game (y/n)? y Please enter your choice from the following menu Rock - 1, Paper - 2, Scissors - 3 : 4 Invalid choice! Please enter your choice from the following menu Rock - 1, Paper - 2, Scissors - 3 : 2 Your choice is Paper My choice is Paper We tie! Would you like to play another game (y/n)? Y Please enter your choice from the following menu Rock - 1, Paper - 2, Scissors - 3 : 3 Your choice is Scissors My choice is Scissors We tie! Would you like to play another game (y/n)? y Please enter your choice from the following menu Rock - 1, Paper - 2, Scissors - 3 : 3 Your choice is Scissors My choice is Paper You win! Would you like to play another game (y/n)? n After playing, the results are you have 1 win(s), 1 loss(es), and 2 tie(s). 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!