Question: This is java programming on eclipse Create a Roshambo game Console Welcome to the game of Roshambo Enter your name: Joel Would you like to
This is java programming on eclipse
Create a Roshambo game
Console
Welcome to the game of Roshambo
Enter your name: Joel
Would you like to play Bart or Lisa? (b/l): b
Rock, paper, or scissors? (r/p/s): r
Joel: rock
Bart: rock
Draw!
Play again? (y/n): y
Rock, paper, or scissors? (r/p/s): p
Joel: paper
Bart: rock
Joel wins!
Play again? (y/n): y
Rock, paper, or scissors? (r/p/s): s
Joel: scissors
Bart: rock
Bart wins!
Play again? (y/n): n
Operation
The application prompts the player to enter a name and select an opponent.
The application prompts the player to select rock, paper, or scissors. Then, the application displays the players choice, the opponents choice, and the result of the match.
The application continues until the user doesnt want to play anymore.
If the user makes an invalid selection, the application should display an appropriate error message and prompt the user again until the user makes a valid selection.
Specifications
Create an enumeration named Roshambo that stores three values: rock, paper, and scissors. This enumeration should include a toString method that can convert the selected value to a string.
Create an abstract class named Player that stores a name and a Roshambo value. This class should include an abstract method named generateRoshambo that allows an inheriting class to generate and return a Roshambo value. It should also include get and set methods for the name and Roshambo value. (10 points)
Create classes named Bart and Lisa that inherit the Player class and implement the generateRoshambo method. The Bart class should always select rock. The Lisa class should randomly select rock, paper, or scissors (a 1 in 3 chance of each).
Create a class named Player1 that inherits the Player class and implements the generateRoshambo method (even though it isnt necessary for this player). This method can return any value you choose.
Create a class named RoshamboApp that allows the player to play Bart or Lisa as shown in the console output. Rock should beat scissors, paper should beat rock, and scissors should beat paper.
Use the Console class described in chapter 8 or a variation of it to get the users entries.
Enhancement
Keep track of wins and losses and display them at the end of each session.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
