Create an application that allows you to play the Rock-Paper-Scissors game against the computer. When played between two people, each chooses one of three possibilities (typically indicated by a hand gesture) at the same moment, and the winner is chosen. Rock defeats Scissors, Scissors defeats Paper, and Paper defeats Rock in the game. The programme should choose one of the three alternatives at random (without exposing it) and then prompt the user to choose. The programme then displays both options and publishes a statement stating whether the user won, the machine won, or it was a tie. Continue to play till the user decides to stop. The number of user wins, losses, and ties is then printed.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Create an application that allows you to play the Rock-Paper-Scissors game against the computer. When played between two people, each chooses one of three possibilities (typically indicated by a hand gesture) at the same moment, and the winner is chosen.
Rock defeats Scissors, Scissors defeats Paper, and Paper defeats Rock in the game. The programme should choose one of the three alternatives at random (without exposing it) and then prompt the user to choose. The programme then displays both options and publishes a statement stating whether the user won, the machine won, or it was a tie. Continue to play till the user decides to stop. The number of user wins, losses, and ties is then printed.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT