subject

Write this program using an IDE. Comment and style the code according to CS 200 Style Guide. Submit the source code files (.java) below. Make sure your source files are encoded in UTF-8. Some strange compiler errors are due to the text encoding not being correct. This lab asks you to create a text game Rock Paper Scissors. The rule of the game: There are two players in this game and they can choose Rock, Paper, or Scissors each time. Rock beats Scissors, Paper beats Rock and Scissors beat Paper. Your program needs to prompt a user to choose an action (Rock, Paper, or Scissors) and save their choice. The program randomly chooses an action (Hint: use .nextInt() to generate random integers in the range of [1,3]. 1 indicates Rock, 2 indicates Paper and 3 indicates Scissors.) Then the program determines who is the winner. When input is R Please select one of [R/P/S]: You chose: Rock I chose: Scissors Rock beats scissors - you win! If the user enters the lowercase, your program can still recognize. When input is p Output should be Please select one of [R/P/S]: You chose: Paper I chose: Scissors Scissors beat paper - you lose! If the user enters invalid input, the program will give an error message and set the default choice as Rock When input is v Output should be Please select one of [R/P/S]: Invalid choice! Defaulting to Rock. I chose: Scissors Rock beats scissors - you win! If the user has the same result as the computer, your program should output: A Tie!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
You know the right answer?
Write this program using an IDE. Comment and style the code according to CS 200 Style Guide. Submit...
Questions
question
Advanced Placement (AP), 02.10.2020 23:01
question
Mathematics, 02.10.2020 23:01
question
Computers and Technology, 02.10.2020 23:01
question
Mathematics, 02.10.2020 23:01
Questions on the website: 13722367