Answered step by step
Verified Expert Solution
Question
1 Approved Answer
e Computer Science question D Group As gnment 1 Descriptor Assgnment 2 Description CSC1 + Part 2 (10 points): Create a Java program that allows
e Computer Science question D Group As gnment 1 Descriptor Assgnment 2 Description CSC1 + Part 2 (10 points): Create a Java program that allows two players to play Rock, Paper, Scissors. Player 1 will enter an integer to determine whether they use rock, paper or scissors. Player 2 will also enter an integer to determine whether they use rock, paper or scissors. Use named constants for rock, paper and scissors and set their values as shown below. Use if-else statements to determine the results of the game. Use the named constants to compare with the player 1 and player 2 choices rather than hardcoding the numbers. Make sure to close your Sconner at the end of your program to avold losing o point When run, the program should look like the screenshots shown below. Named constants: ROCK 1 PAPER 2 SCISSORS 3 Name your Java program RockPaperScissors.java and submit it to Canvas along with the other files specified in the "Grading" section below. Make sure your program compiles before submitting it to avoid losing points. Example 1 Player 1 chooses rock Player 2 chooses paper Player 2 wins! lock _ 1. Paper-2. Scissor-3 layer 1enter your node of attack! layer 2 enter your node of attack
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started