Question: Java or C++ playRps This method plays 24 rounds of rps and returns the total points earned. For each of the 24 rounds, playerls hand

Java or C++
playRps This method plays 24 rounds of rps and returns the total points earned. For each of the 24 rounds, playerls hand gesture will be based on calling the nextInt method of the given Random object. If the next integer is even, playerl will play rock. If it is odd, playerl will play paper. Playerl never plays scissors. Player2 will play rock in the first round, paper in the second round, scissors in the third round, and repeat the cycle starting with rock again in the fourth round. The method will sum the return values for the 24 calls to rps and return the total. Note, since an invalid input is never passed in to an rps call using playRps, your return value should always be a non-negative number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
