Question: I'm doing a java assignment that reads in a given text file with 12 phrases and from that I need to write a program that
I'm doing a java assignment that reads in a given text file with 12 phrases and from that I need to write a program that plays a guessing game. This is an intro java course so I can't use more advanced methods, only file input, strings and arrays. The program must include these static methods with the main. A method that loads the input from a file into array, method that picks the puzzle from the text file list, method that plays one game, method that prints the puzzle, method to check if solved and method to check if guess was in puzzle. I posted a screenshot below that a correct version of the game looks like. The guesses are limited to only letters, any commas, periods, explanation marks, apostraphe's, etc as you seen in the example are already shown when the program runs.

Let's play a game of word guess You can guess wrong up to 3 times Guess a letter> h h was found in the puzzle 1 times Guess a letter > E E was found in the puzzle 4 times H e Guess a letterL L was found in the puzzle 1 times Guess a letter> p p was found in the puzzle 1 times Guess a letteri i was found in the puzzle 1 times Hel p I_ee -- -- e--- -. Guess a letter> n n was found in the puzzle 1 times Hel pIneee -- - - Guess a letter > s s was found in the puzzle 1 times Hel p I nee s-e--- - . Guess a letter > y y was found in the puzzle 1 times. He l pInee e -- - y Guess a letter c c was not in the puzzle You have 2 more incorrect tries Hel pI neee -- - y Guess a letter d d was found in the puzzle 2 times HelpI needS__e__dy. Guess a letter> o o was found in the puzzle 2 times. Hel p !Ineed so_e_ody . Guess a letter m m was found in the puzzle 1 times Help Ineed some_ody Guess a letter> z z was not in the puzzle You have 1 more incorrect tries Help!Ineed some_ody Guess a letter> b b was found in the puzzle 1 times. You solved the puzzle! Good job
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
