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

Operating system (o.s), Operating System (O.S) An operating syst...

Operating System (O.S) An operating system is the complete set of programs written to utilize the computer resources in an optimal manner. The operating system supervise

Types of computer on basis of size and capabilities, Another way of classif...

Another way of classifying a computer system is based upon its size and capabilities: Microcomputers: Microcomputers are systems based on the use of microprocessors. A Micr

About execution cycle, One time a program is in memory it has to be execut...

One time a program is in memory it has to be executed. To do this, each instruction must be appeared at, decoded and acted upon in turn until the program is finished. This is accom

What isit, what can you do and what and how who can becbgbfbvuidfgvbkjfdhvb...

what can you do and what and how who can becbgbfbvuidfgvbkjfdhvb98dshrnfjkbhqdbnfiubnfdjbhdfiubndfubhfdbhfdiubhdfuibhyfdubhdfbhfbhdf8u

Reasons for recommendation free and open source software, For multi-nationa...

For multi-national business IT system, free and open source software (FOSS) is recommended over a proprietary system. The reasons for this recommendation are: 1. Security I

Computer, what is the computer science

what is the computer science

Programming, create a simple Visual Basic project

create a simple Visual Basic project

Describe symbols chart in assembly process ?, SYMBOLS CHART Every one of t...

SYMBOLS CHART Every one of the parts on code line in assembler is known as token, for instance on the code line: MOV AX, Var We comprise three tokens, the MOV instruction, the AX o

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