Question
NOTE: ** I ONLY NEED THE TESTING CODE FOR THIS. I ALREADY FOUND THE MODIFIED CODE*** JUnit5 Modify your Rock Paper Scissor Lizard Spock game
NOTE: ** I ONLY NEED THE TESTING CODE FOR THIS. I ALREADY FOUND THE MODIFIED CODE*** JUnit5
Modify your Rock Paper Scissor Lizard Spock game from Week 6 to generate a random number for Player 2, use the random number to assign it a string selection (rock paper scissor lizard spock) and assign that as Player 2's choice. Complete the work of assigning Player 2's random choice in a method. It should take no parameters but return a string that represents Player 2's random choice. The implementation should use the Random class to get your random number.
Now you are only getting a choice from player one and playing until they enter done using the sentinel value loop. The rest of your program should stay the same. You can use your program with the nested if statements or the switch statement.
Verify that your file still works with your testing file. If Lizard and Spock are not implemented, verify that those tests are added. Make sure all your tests are exhaustive (uppercase, funky case, same plays, all options, bad input). Note: you do not need to test your random player 2 option method. After all, how could you? (The answer is not easily; therefore, you do not need to test it - just your determine who the winner is method.)
The assignment is worth 15 points for the two files. Upload your class and the testing file to the assignment. Both files must be submitted in order to be graded.
NOTE: ** I ONLY NEED THE TESTING CODE FOR THIS. I ALREADY FOUND THE MODIFIED CODE*** JUnit5
NOTE: ** I ONLY NEED THE TESTING CODE FOR THIS. I ALREADY FOUND THE MODIFIED CODE*** JUnit 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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