Question: Please Help finish this problem in java code following the steps in flowchart below. Specs: Play against the computer (a randomly generated value 0, 1,
Please Help finish this problem in java code following the steps in flowchart below.


Specs: Play against the computer (a randomly generated value 0, 1, or2 for possible options) a , ) Game must ask for the user's name accept user choice and validate that it is a correct choice, otherwise end the game Announce the winner: computer or user (announced by user's name) MUST USE A BOOLEAN VARIABLE in your solution hint: think of all the possible outcomes as branches Game should play best out of 3 fi.e. play 3 times before quit) START Import Scanner Prompt rane intuserChoice in comhoice int com intelis boleh Store Promot Choice 3 Store user Choice FuserChoice OOR 1 OR 2 FALSE counter FALSE COD Choice Main Random FerChoice mehr THUE L Panas FALD user Choice 083 computerChoice 2 OR ? userChoice 13.8 computerChoice == 0 OR we Choice = 288 computer Choice1 Computer Win Computer dhe Chic urheio CONTOU uterChoice == 1. cph ? Chim? A computer Comet Choice Player FALSE WinCheck true If WeCheck Print You wil END 1 import java.util.Scanner; 2 3 public class Workshop8 { 4 5 public static void main(String[] args) { 6 7 Scanner kbd = new Scanner (System.in); 8 9 10 String name; 11 int userChoice; 12 int computerChoice; 13 int counter = 1; 14 int gameWins = 0; 15 boolean winCheck = false; 16 17 System.out.println("Who's playing?"); 18 name = kbd.next(); 19 20 while (counter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
