subject

In JAVA please:
Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:-
When the program begins, the user enters his or her choice of "rock", "paper", or "scissors" at the keyboard using a menu in a function, userChoice, that returns a character.
Next, there should be a function, computerChoice, that generates the computer’s play. A random number in the range of 1 through 3 is generated. (NOTE: You’ll have to do some research on how to create random numbers correctly.) If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. The computer’s choice is returned as a character.
After, a function, determineWinner, will determine the winner between the user’s choice vs. the computer’s choice. (NOTE: It will return nothing, but it will take in the user’s choice and the computer’s choice as the two arguments.) The result is selected according to the following rules:
O If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.)
O If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)
O If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.)
O If both players make the same choice, the game ends in a draw and there is no winner.
Finally, after a result is selected, there should be a function, playAgain, in which the player should have the option of playing again. This should return a boolean. Be sure that the program contains at least the four functions mentioned .

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 22.06.2019 12:20
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 01:40
You have a linux system that has a 1000gb hard disk drive, which has a 90gb partition containing an ext4 filesystem mounted to the / directory and a 4gb swap partition. currently, this linux system is only used by a few users for storing small files; however, the department manager wants to upgrade this system and use it to run a database application that will be used by 100 users. the database application and the associated data will take up over 200gb of hard disk space. in addition, these 100 users will store their personal files on the hard disk of the system. each user must have a maximum of 5gb of storage space. the department manager has made it very clear that this system must not exhibit any downtime as a result of hard disk errors. how much hard disk space will you require, and what partitions would you need to ensure that the system will perform as needed? where would these partitions be mounted? what quotas would you implement? what commands would you need to run and what entries to /etc/fstab would you need to create? justify your answers.
Answers: 3
You know the right answer?
In JAVA please:
Write a program that lets the user play the game of Rock, Paper, Scissors agai...
Questions
question
English, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Mathematics, 30.01.2021 01:00
question
Chemistry, 30.01.2021 01:00
Questions on the website: 13722360