Question: java Problem Statement Code a Java program to create the following game. This is a game of 4 questions (not 20). The object of the
Problem Statement Code a Java program to create the following game. This is a game of 4 questions (not 20). The object of the game is to determine what type of animal you are. (Rabbit, Dog, Fish or Turtle). Inputs Ask the player the following four yeso questions and save the user's answers in variables. Do you swim? yeso o Do you have fins? yeso Do you bark? yeso o Do you growl? yeso You user could answer Yes, yes, or YES, so convert the answer to lowercase before you evaluate it. Add loop to continue playing the game. Stop when the user wants to stop. Count how many times the user played the game. Use the abbreviated incrementor to do this. Processing o You MUST use AND OR and NOT to complete this exercise. o You MUST use the following assumptions to determine the animal. 1. Animals that do NOT swim are rabbits 2. Animals that swim AND have fins are fish 3. Animals that can bark OR growl are dogs 4. Animals that swim but do NOT have fins AND do NOT bark are turtles When you figure out what animal it is, have the animal say "Oh, that is me. I am a o To end the program, you need to answer "No", then display how many runs you have tried. o Last line output should be : ---END--- Sample Run
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
