Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M91232190

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As