Java application modeled after the game of hangman

Assignment Help JAVA Programming
Reference no: EM13692748

Creating a Java application modeled after the game of hangman, where a user must guess a hidden word or phrase in a limited number of guesses.

As part of your solution you will need to create two Java classes that represent graphical objects. The first is the Gallows class which represents the frame upon which the unfortunate Figure class will meet its demise should the player guess incorrectly.

You will also need to create a GUI (graphical user interface) that allows players to interact with your game. This includes the following:

• Entering a guess
• Submitting a guess
• Viewing the number of letters in the word they must guess
• Viewing the completed portion of the word they must guess
• Viewing their progress towards a losing the game
• Being able to reset the game with a new word
• Being able to choose a custom word for a new game
• Being notified when they win or lose the game
• Being given the option to see the secret word if they were not able to guess it

Algorithms:

Develop multiple algorithms in order to solve the following problems:

1. You will need to be able to select a random word from a list of words. See the instructions below for information on the different methods that can be used to accomplish this.

2. You will need to be able to display what portion of the secret word has been discovered and what portion remains unknown. This may be difficult and may involve multiple cases.

3. You will need to check user input to make sure it is valid. This includes making sure that they have entered a letter, checking that they have only entered a single letter, and checking that they have not previously used that letter before.

4. You will need to be able to determine if a guess made by the player is contained in the secret word and either update the displayed portion of the secret word to reflect a correct guess, or visually indicate an incorrect guess by displaying the additional parts of the Figure.

5. You will need to check if a custom word entered by a user only contains valid characters such as letters and reject any input that contains invalid characters.

6. You will need to determine if a player has won or lost the game and appropriately convey that information to the user and ask them if they would like to restart the game.

Reference no: EM13692748

Questions Cloud

Add vitride to a sluggish grignard reagent formation : Comment on whether or not it is/was worthwhile to add Vitride to a sluggish Grignard reagent formation based on your answer to part 2 above as well as based on how you characterized the product.
One drop of the vitride solution : How many moles of Vitride are in one drop of the Vitride solution?
Nme the phenol with two chlorines : Nme the phenol with two chlorines
Calculat the number of mol atoms of h present in 1 : Calculat the number of mol atoms of H present in 1 molecule of aspartame
Java application modeled after the game of hangman : Creating a Java application modeled after the game of hangman, where a user must guess a hidden word or phrase in a limited number of guesses.
What is the engineer concern : What is the engineer's concern about the overhead rate going "up and up"?
Determine what action the firm should pursue : Use decision analysis tools discussed in class to determine what action the firm should pursue in order to minimize expected loss; either manual analysis or software is acceptable. Please also calculate the minimum expected loss.
Prepare a budgeted income statement : Prepare a budgeted income statement
A useful definition of price gouging : A useful definition of price gouging?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write the bubble sort

The village of Marengo conducted a census and collected records that have household data, including the number of occupants in each household.

  Create an application that provides a solution

Create an application that provides a solution for problem 20.8 In addition to requirements specified in the description.

  Explain how cookies are used to implement sessions

Describe a set of four methods that a queue would need to implement using a circular array and show the Java code to implement them if using an implementation given the outline definition below. Do not use any methods of the Collection classes.

  Prints out a summary for a list of prescriptions

Create a class that prints out a summary for a list of prescriptions. Using your Prescription class and some if statements you will read in 3 prescriptions and print out an appropriate summary with a list of the prescriptions

  Write down ijvm code to remove top two words from stack

Write down IJVM code which will remove these top two words, multiply and put their product back on stack. You are allowed to use existing IJVM instructions only.

  Write a java program that prints the numbers from 1 to 125

Write a Java Program that prints the numbers from 1 to 125. But for multiles of three print "Batman" instead of the number and for the multiples of five print "Superman". For instances which are multiples of both three and five "JusticeLeague".

  Programming principles please help me doing my assignment i

please help me doing my assignment i have attached my assignment requirement document refer it and send me the solution

  Create a class named box that includes integer data fields

Create a class named Box that includes integer data fields for length, width and height. Create three constructors that require one, two and three arguments, respectively.

  Latin squares - puzzle

Solve button causes the program to display a single solution by using only the symbols from the top row of six text fields in such a way that the non-empty grid symbols are not altered.

  What is the purpose of the restrict keyword in c99

Arrays of strings in C and C++ can also be initialized with string literals. In this case, the array is one of pointers to characters.

  Write down a program which determines the bonus that must

write a program that determines the bonus that should be paid to employees. bonuses are determined based on the years

  Most of the companies use virtualization to make test

write a 200- to 300-word short-answer response to the following many companies use virtualization to create test

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd