Question: Java Create a new Java file called RPSLSYourLastName . Copy your Rock Paper Scissor Lizard Spock game from last unit into it. Modify the

Java

Create a new Java file called "RPSLSYourLastName". Copy your Rock Paper Scissor Lizard Spock game from last unit into it. Modify the method to use a switch statement instead of nested if statements. If you haven't, implement Lizard & Spock. Everything else should still work for your game. Again, prompt the both player 1 and player 2 for a String (as their selection). Pass that value into your method. Set a default value for the winner (either player 1 or player 2) and switch the value if the other person wins or there is a tie. This image might help you figure out who win.

Report back whether player 1, player 2 or it's a tie. Again, do not print from your decision structure.

Add testing to this program. If you ONLY change the .java file name and the method implementation, you should be able to just modify your testing file from the last unit quickly and everything will still work [you may have to add in testing for Lizard & Spock if you didn't already have it]. When you are finished upload, the RPSLSYourLastName.java & your testing file to Blackboard. This is worth 15 points.

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!