100% Guaranteed Results


CS6308 JAVA PROGRAMMING Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

ASSIGNMENT 8: String handling
Total Points:100
Write a program to implement Hangman game in Java, a word-guessing game where one player thinks of a Secret word, and another player (the computer i.e., Guesser or user) tries to guess it by stating one letter at a time.If the guessed letter is in the secret word, it’s revealed in the display; otherwise the number of attempt is reduced by one. The player usually has a limited number of incorrect guesses allowed before they lose the game.The game ends when the player successfully guesses the word (win) or when they run out of allowed incorrect guesses (lose).The game typically has the following components:[CO:2 BL:6]
Input :The guesser or user tries to guess the secret word by stating each of the character in the secret word.
Output: A representation of the secret word is displayed with underscores for each letter that hasn’t been guessed yet. For example, if the secret word is “java” and the player has guessed ‘a’, the display would be “_ a _ a”.
Method:Guessing
Guessing: Fix the maximum attempts. Create a guessedLetter Boolean array of secret word length size to verify the guessed character of secret word.
Process the guess [10 points each]
i. Check input is a valid input (i.e a character)Check if the guessed letter is in the secret word
ii. Update guessedLetters array
iii. Check if the entire word has been guessed iv. Increment attempts if the guess is incorrect
v. Print game messagesWin/Lose Conditions
vi. The player receives feedback on their guesses, including whether the guessed letter is in the word and the current state of the word display.
Increase the complexity of the program by having more than one secretWord and choose it randomly. Give clues about the secretWord and reduce the points accordingly. [30 points]
CO2: To familiarize the student with Object Oriented Programming in Java BL6: Create

Reviews

There are no reviews yet.

Be the first to review “CS6308 JAVA PROGRAMMING Solved”

Your email address will not be published. Required fields are marked *

Related products