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, 24.06.2019 06:30
For which utilities, if any, does the landlord pay?
Answers: 2
question
Computers and Technology, 25.06.2019 05:10
Maia notices that her paragraphs are too close to one another. she wants to increase this space. which arrangement of steps does maia follow after she goes to the paragraph command group in the ribbon? type in the space needed, go to the after menu, go to the spacing part of the box, and open the paragraph dialog box. go to the spacing part of the box, go to the after menu, open the paragraph dialog box, and type in the space needed. open the paragraph dialog box, go to the spacing part of the box, go to the after menu, and type in the space needed. type in the space needed, open the paragraph dialog box, go to the after menu, and go to the spacing part of the box.
Answers: 1
question
Computers and Technology, 25.06.2019 06:00
Shaniya has misspelled a scientific name in her biology report. she needs to correct it, but she has no access to a computer. she plans to use the word app on her phone without an office 365 subscription. can shaniya correct her mistake? why or why not? yes, she can navigate the window and do simple editing. yes, she can use this application for free and navigate the window. no, her document is “read-only,” so she cannot navigate the window. no, her application has limited features and she cannot access the documen
Answers: 1
question
Computers and Technology, 25.06.2019 07:10
When you “listen” to evaluate an online message, which question should you ask?
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
Mathematics, 05.07.2019 09:00
question
Mathematics, 05.07.2019 09:00
question
Mathematics, 05.07.2019 09:00
question
Mathematics, 05.07.2019 09:00
question
Mathematics, 05.07.2019 09:00
Questions on the website: 13722362