Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How to write this Java code? eate a very simple game of hangman. You are given dict.txt which is a file of words (one per
How to write this Java code?
eate a very simple game of hangman. You are given dict.txt which is a file of words (one per line). Load these Randomly select one word. Display the word as all asterisks (one asterisk per letter). Allow the user 10 attempts to guess the word. After e ach guess, "reveal" all occurrences of the guessed letter in the displayed string or update the number of incorrect guesses. You are required to use at least 2 methods besides insensitive. Things you do not need to handle: main), although more may be warranted. A few sample runs are provided. Your game should be entirely case- Invalid input. If the user enters "6" as their guess, it will be counted as an incorrect guess. . Duplicate letters. It's up to the user to not guess the same letter twice You may use abbreviated documentation on this program. For each method, state a short description - no javadocs required. In line comments, as needed Step 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