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, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 22.06.2019 20:50
What is the difference between windows 7 and windows 10?
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
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
Computers and Technology, 20.11.2020 03:10
question
Mathematics, 20.11.2020 03:10
question
Arts, 20.11.2020 03:10
question
Chemistry, 20.11.2020 03:10
Questions on the website: 13722361