Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2 The questions in this part of the assignment will be graded. General rules for the hangman word game: (http://en.wikipedia.org/wiki/Hangman_%28game%29) Hangman is a guessing

Part 2 The questions in this part of the assignment will be graded. General rules for the hangman word game: (http://en.wikipedia.org/wiki/Hangman_%28game%29) Hangman is a guessing game for two or more players. One player thinks of a word, phrase or sentence and the other(s) tries to guess it by suggesting letters within a certain number of guesses. The game is over when: The guessing player completes the word or guesses the whole word correctly, or the number of tries is exhausted. Programming Question #1: Hangman Game (only to guess the word) 1) The word to guess can have repeated letters. 2) The word to guess is not case sensitive, and only up to a maximum of 10 characters. 3) The guessing player has 10 tries to find the letters. 4) The player can guess the entire word in one shot, at any time of the game, or S/he must can guess and write one letter at a time. Recommended skeleton of the structure of your program (refer to screen shots for examples): 1) A player enters the word to guess. Remember a word can only have letters. 2) Print 20 blank lines to clear hide the word to guess from the screen, before guessing player starts. 3) Guessing player (the other player) is shown with stars for the number of letters in the word to guess. Your program also shows the number of guesses left as well as a list of the letters still not picked (See sample run output below). 4) Guessing player is prompted for a letter. 5) As long as the input is more than one character long, is not a letter or is a letter that was already tried, your program should keep on prompting the user for valid input. Incorrect entries should not be counted as guesses. 6) Once a valid letter is entered, your program (a) updates the list of letters (alphabet) still left to try by removing this letter from the list if there are no more characters of the same letter in the word, (b) reduces the number of guesses left by one, and (c) checks whether the letter is part of the word to guess. If it is, then replace the star with the letter in the appropriate position. Steps 3 to 6 are repeated till all letters in the word are found or reaches 10 guesses. 7) Your program name must be Hangman and all program code must be in the main() method. Your program should use: strings, selections, and loops. Your program shouldnt use arrays. Your program ends with a summary of the game (See sample output)

IN JAVA PROGRAMMING image text in transcribedimage text in transcribedLANGUAGE

OK Guessing Player ... turn around, while your friend enters the word to guess! Other Player - Enter your word (up to 10 letters only, not case sensitive): Talla

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

2. List the advantages of listening well

Answered: 1 week ago