Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need the answer in Java format using the methods that I attached below the question 9. (10 points) [Not part of Lab 06] Write
I need the answer in Java format using the methods that I attached below the question
9. (10 points) [Not part of Lab 06] Write a method named play in the GuessingGame class. It should accept one parameter, which is a Scanner from which it can read input. It should not return anything. It should do the following: Get a secret word. . Create a blank revealed word of the same length. Clear the console with 30 blank lines o Repeat the following steps while the revealed word and secret word do not match -Show the revealed word to the player (exact text below) Get a guess. -Replace the revealed word with a version in which the guessed letter has been revealed. . Congratulate the player on discovering the word (exact text below) . Tell the user how many guesses they made (exact text below) Here is what a run of the play method might look like: Enter the secret word: book . 30 blank lines Your knowledge so far: __.. Guess a letter: o Your knowledge so far: 00 Guess a letter: k Your knowledge so far: _OOK Guess a letter: c Your knowledge so far: _OOK Guess a letter: 1 Your knowledge so far: _OOKStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started