to write methods, write conditionals, generate random numbers, and ask the user if the output is correct or incorrect.

Your goal is to write methods, write conditionals, generate random numbers, and ask the user if the output is correct or incorrect.

switchAnimal method

Write a boolean method using a switch that prints a random fact about an animal and returns whether that fact is true or false.

Name this method switchAnimal. (1 point)
The method should take in a number. (1 point)
Use a switch to determine which animal fact is selected. You should have 10 animal fact options (5 facts true and 5 false). (3 points)
Print the random animal fact. (1 point)
Return whether the fact is true or false. (1 point)
Main method

Generate a random number between 1 and 10. (1 point)
Call the switchAnimal method with your randomly generated number. This should print the animal fact and return whether the fact is true or false. (1 point)
Ask the user whether the fact is true or false. (1 point)
Call the compare method. (1 point)
Ask the user if they would like to play again? Repeat the game if they choose yes. (3 points)
compare method

Write a void method that compares the result from the switchAnimal method with the user’s answer to determine if the user is correct or incorrect.

Name this method compare. (1 point)
This method should be void. (1 point)
Compare the result from the switchAnimal method with the user’s answer using a conditional. Be sure to allow for variations in the user’s answer (allow true, True, TRUE, etc.). (3 points)
Print whether they are correct or incorrect. (1 point)
Example output:

Cheetahs are the fastest land animal.
True or False? true
Correct
Play again (yes or no)? no