Question: no arrays, using java with comments please 5. Use methods to re-do the R, P, S problem from HW3 -- see Problem 4, part b).
5. Use methods to re-do the R, P, S problem from HW3 -- see Problem 4, part b). Put a single RPS game play into a separate method, called from main. You keep track of the score (how many games won by each player) in main; eventually, in main, you recognize one player has won 3 games, you terminate the match, and report who won, by which final score insofar as won vs. loss games, and after how many games total (including ties). NOTE: in this problem, like in Problem 3, use of methods is required (i.e., use of methods is mandatory, not optional). 1/Problem #4b: Rock, Paper, Scissors pt. 2 char options [] = { 'R', 'P', 'S' }; Random random = new Random(); 1/scan for users input of R, P, S Scanner fourb - new Scanner(System.in); int userwin - @, compwin =; 1/use while loop until either user or computer wins 3 times while ((userwin userwin) System.out.println("Computer won the game."); else System.out.println("You won the game!")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
