Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Monkey fools Ninja Monkey unplugs Robot Robot chokes Ninja Robot crushes Zombie Pirate drowns Robot Pirate skewers Monkey Ninja karate chops Pirate Ninja decapitates Zombie

image text in transcribed

Monkey fools Ninja Monkey unplugs Robot Robot chokes Ninja Robot crushes Zombie Pirate drowns Robot Pirate skewers Monkey Ninja karate chops Pirate Ninja decapitates Zombie Zombie eats Pirate Zombie savages Monkey Nobody wins

Write an algorithm and code for your application based on the above description. Make sure the output matches the sample above. Please do it in JAVA, NOT C++.

Sample Here's a sample game play. User input in bold Note: The prompt to enter a valid choice should repeat until the user has entered a valid choice, not just once. Player 1 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Invalid choice, Player 1. Enter a number 1-5: Player 2 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Invalid choice, Player 2. Enter a number 1-5: Monkey fools Ninja. Player 1 wins! Would you like to play again? 2 yes Player 1 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Player 2 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Zombie eats Pirate. Player 2 wins! Would you like to play again? no GAME OVER

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions