Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a Ro-sham-bo game in Java with the following specifications: - The applic

ID: 3641018 • Letter: C

Question

Create a Ro-sham-bo game in Java with the following specifications:

- 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 player’s choice, the opponent’s choice, and the result of the match.

- The application continues until the user doesn’t 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.

- 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.

- 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 RoshamboApp that allows the player to play Bart or Lisa as shown in the sample run. Rock should beat scissors, paper should beat rock, and scissors should beat paper.

Sample Run:

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

Explanation / Answer

Got it all written up for you. Links: - RoshamboApp.java --> http://bit.ly/H6iJxF http://bit.ly/H4rwVv http://bit.ly/GPpk5q http://bit.ly/GQrue5