Question: In Demonstrate use of conditionals, loops, String methods, and random numbers Methods are not required for this project; however, it will significantly improve your code
In Demonstrate use of conditionals, loops, String methods, and random numbers
Methods are not required for this project; however, it will significantly improve your code
cleanliness.
Description
Your task is to write a program that plays Simon Says with the program user. Simon Says is a
game where a user repeats a presented pattern. Your Simon Says program will support modes.
The user will choose which mode to play at the start of the game and beginning of each round.
easy mode will play the game with colors
colors: yellow, green, red, and blue
hard mode will play the game with numbers
numbers single digit:
At the end of each round ie the user has lost the user should be presented with the maximum
number of sequences they correctly repeated. Then the user should be prompted to do another
round and, if so they should be prompted to select the mode.
For hard mode, the numbers should actually go from to
Requirements
You may only use tools discussed so far in this course: data types, String methods,
random numbers, if statements, switch statements, and loops for while, and do while
You are not required to use methods, but they will help with code cleanliness. Use of
arrays, ArrayLists, HashMaps, etc. is not allowed.
If the user enters an invalid mode, continue prompting until they enter a valid mode.
After Simon says: program should wait seconds and clear the screen, and then
get input from the user. See Provided Code Hints section on how to accomplish this.
In a round regardless of mode Simon adds one thing to remember.
When checking if the user has entered the correct sequence, you should ignore spaces
AND ignore casing upper lower case lettering
ex Simon Says: red green yellow, user can repeat red green yellow OR redgreenyellow
OR RED greenYELLow
When a round is lostthe user did not enter the correct sequence the user should be
offered to play another round if the user enters no the program should exit. If the user
enters yes prompt the user for a mode and start a new round. Repeat question until user
enters yes or no
The score should be reset each round.
Java code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
