Determining the winner will require you to compare a lot of


I need some help on my java project, this is just a part of it. **When you answer this question please follow the instructions.**

Write a JAVA class (Rock, Paper, Scissors Game) that represents the game.

This class only represents the game.

This class does not interact with the user at all.

The RPSGame object is described by three characteristics. These are the instance data variables:

number of computer wins

number of user wins

number of ties

Include appropriate getters and setters.

Include constants or an enum to represent the possible moves (rock, paper, or scissors) and the possible outcomes of a single round (user win, computer win, or tie).

Use these constants/enum to make your code more readable.

For example, if you are using ints to store the moves, it's more clear to test whether userMove==ROCK or userMove==Moves.ROCK rather than userMove==1.

If you don't use an enum, you can decide what type of data to use for the constants (String, int, or something else).

Write a generateComputerPlay method that generates a random move by the computer.

Write a findWinner method that takes in two moves as parameters (the user move and the computer move) and determines the outcome (user wins, computer wins, or tie).

Determining the winner will require you to compare a lot of possible match-ups through a series of nested conditionals.

The method should update the instance data (number of computer wins, number of user wins, and number of ties) depending on the outcome.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Determining the winner will require you to compare a lot of
Reference No:- TGS02869583

Expected delivery within 24 Hours