Question: import java.util.*; public class RPS { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int user = 0, pc = 0; var games

 import java.util.*; public class RPS { public static void main(String[] args){

import java.util.*; public class RPS { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int user = 0, pc = 0; var games = new ArrayList(); char[] outcomes = {'R','P','S'}; while(user pc) System.out.println(" The user wins!:D"); else{ System.out.println(" The computer wins!;)"); } } }

// the above java code is from my previous HWK4 part (B) assignment

//Can someone please help me with this problem? Thank you

//Please use comments so i can understand it better from my end

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)

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!