Graphical user interface and arrays, Basic Computer Science

Assignment Help:
In this program, you are going to write a program for playing the game of Hangman. In this game, the computer will pick a word and display a sequence of blanks to be filled in; one for each letter. The player will make guesses about what letters are in the word. If he/she guesses a letter that appears in the word, the appropriate blanks will be filled in. If the guess is a letter that doesn''t appear in the word, one part will be added to a figure hanging from a scaffold. When the hanging figure is complete (seven bad guesses), the game is lost.
Objectives:

* Write a GUI program
* Implement the ActionListener interface to handle Events
* Use arrays
You are to write the Hangman class (a driver class that creates the main window for this GUI program), HangmanPanel (a JPanel which contains all the components needed to run the program) and any other classes that you need to make this game work.

Specification:
* Hangman
o Your main class should create a JFrame and put a HangmanPanel in its content pane.
* HangmanPanel
o This class should extend JPanel and contain all the components needed for the user to play the game
+ The user should be able to start a new game and quit the program.
+ You need to provide components to display the letters that are are currently known as well as to allow the user to select a letter from the ones which have not yet been guessed.
+ You need a way to display the current state of the hanged man.
+ You will need at least one Listener class.
o When the game starts, the program should get a word from the WordList class (see below) and initialize the available letters and the blanks to be filled in. The words in this version of the game will all have eight letters in them.
* There should be no console output in this program
* All input to the program should be handled with components. JOptionPane dialogs should not be used for input.
* Handle all appropriate exceptions.

Related Discussions:- Graphical user interface and arrays

COMPUTER, DUNIYA KA AISA KONSA KOMPUTER HAI. JISME KEYBORD, MOUSE NAHI HAI?...

DUNIYA KA AISA KONSA KOMPUTER HAI. JISME KEYBORD, MOUSE NAHI HAI?

What is computer, how to use computer and how we can manage it

how to use computer and how we can manage it

Extension.., short note about extension..

short note about extension..

Super computers, Super Computers: The specialised demands and requirem...

Super Computers: The specialised demands and requirements of science, industry and military have led to the creation of powerful super computers. For numerically intensive com

Variables and constants, Variables and Constants: These are the smalle...

Variables and Constants: These are the smallest components of a programming language.  For writing a program, one must know how to use the internal memory of a computer. A Com

Explain different types of attacks, Question 1 Explain synchronous and asy...

Question 1 Explain synchronous and asynchronous Data Replication Question 2 Write a short note on Access Time, Latency, Transfer Time, and Streaming Tape Question 3

Desktop computer, Desktop computer: Desktop computer is popularly know...

Desktop computer: Desktop computer is popularly known as personal computer (PC). As the name suggest, it is generally small in size and fitted on the top of a desk which can b

What is deadlock ?Differentiate two types of resources ?, • A set of proce...

• A set of process is in a deadlock state if each process in the group is waiting for an event that can be caused by only another process in the set. In other words, each member of

Application software, APPLICATION SOFTWARE Application Software ...

APPLICATION SOFTWARE Application Software generally is the software which is used to generate customized applications for the clients. Ex: Word Star, Lotus 1-2-3, Ms-

Assignment - concept of programming language , Assignment :  It is compose...

Assignment :  It is composed of variable name, an assignment operator of the language and a value or variable or some expression as per composition allowed based on rules defined

Write Your Message!

Captcha
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