Question: Please use Java Problem 5. Game: Scissor, rock, paper (Game.java) Descriptions: Write a Java class named Game that plays the popular scissor-rock- paper game. (A

Please use Java
Please use Java Problem 5. Game: Scissor, rock, paper (Game.java) Descriptions: Write

Problem 5. Game: Scissor, rock, paper (Game.java) Descriptions: Write a Java class named Game that plays the popular scissor-rock- paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) The program randomly generates a number 0, 1, or 2 representing scissor, rock, and paper. The program prompts the user to enter a number 0, 1, or 2 and displays a message indicating whether the user or the computer wins, loses, or draws. Play the gam until either the computer or the user can win more than successively two times. Outputs: Scissor(o), rock(1), paper (2): 1 The computer is scissor You are rock You won Scissor(0), rock(1), paper(2): 2 The computer is rock You are paper You won Scissor(0), rock(1), paper(2): 0 The computer is paper You are scissor You won Game Over! Problem 6. Lottery Numbers (Lottery.java) Descriptions: Write a Java class named Lottery that can generate a lottery of two-digit number. It is required that the two digits in the number are distinct. (Hint: Generate the first digit, and then use a loop to continuously generate the second digit until it is difference from the first digit). You are required to use the do-while loop to implement it. Outputs: $java Lottery The first digit is 7 The second digit is 5

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!