Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this program you will use classes to start to create a hangman game. The prog

ID: 3567703 • Letter: I

Question

In this program you will use classes to start to create a hangman game. The program randomly chooses a word from a dictionary (of words chosen by you). The randomly selected word is displayed for the player along with the current guess

In this program you will use classes to start to create a hangman game. The program randomly chooses a word from a dictionary (of words chosen by you). The randomly selected word is displayed for the player along with the current guess ''word'' (the one with all the dashes since the user has not had a chance to guess any letters yet) and a list of letters unsuccessfully tried (this would be blank because again the player has not been given the opportunity to guess anything yet). The program then invites the player to guess a character or exit. If the player enters a character, the guess ''word'' and the used letters list are updated appropriately. Both are again displayed for the player. The program continues in this fashion until the player decides to exit or all the letters of the word have been ''guessed''. Allow the user to do this preparatory game with a new word if so desired without restarting the program. Create a dictionary class which holds ten words for your program and let them be the program's ''dictionary''. (Choose and hard-code the words.) One of these words is chosen each time the player wants to play a round. Include any appropriate methods in this class. Use a separate file. Consider private, public, final, static modifiers carefully for the contents of this class. Record considerations, decisions in the journal. Don't forget to use UML notation for all the classes. Design and implement a word class for the chosen word. Consider the word's properties, constructors, and methods. Encapsulate your data. Write appropriate get/set routines. Keep the journal up to date appropriately. Design and implement a guess class. Be sure your guess has as many -'s as there are letters in the chosen word. Consider the guess's properties, constructors, and methods. Should/could the list of used letters be part of this class? Encapsulate your data. Write appropriate get/set routines. Record considerations, decisions, etc. in your journal. Design and implement a driver class with a main method. Please be careful to communicate with the player through main only. Consider the strings used in this program. Use StringBuilder for strings that change. Remember, strings are immutable. Be sure to encapsulate your data for the word and guess classes. This means you need to write get/set methods for anything another class/method (most likely the main method) might need. Be very careful with static, public, and private data/methods. This will be a grading point. The program should initially greet the user and show the chosen word. The guess word and used letters list follows. Make sure the guess word has the correct number of dashes. Ask the ''player'' for a character, ''exit'' if another word (or stopping the game) is desired. If the letter is correct, it should be updated in the correct position(s) in the guess word If a letter is incorrect, it should be updated in a list of letters already tried by the player. Both the new guess word and the list of used letters should be displayed after each letter guess. When all letters are found, or when the player types ''exit'', ask if the player wants to try again with another word. If not, say goodbye to the player and stop execution. Be sure to consult the Strings chapter for any helpful methods. Use whatever built-in methods you'd like. You must also decide and use String and StringBuilder correctly. Make sure to implement classes.

Explanation / Answer

Thank You
Please Rate

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote