Graphical user interface and arrays, Basic Computer Science

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.
Posted Date: 4/6/2012 8:24:24 PM | Location : United States







Related Discussions:- Graphical user interface and arrays, Assignment Help, Ask Question on Graphical user interface and arrays, Get Answer, Expert's Help, Graphical user interface and arrays Discussions

Write discussion on Graphical user interface and arrays
Your posts are moderated
Related Questions
The primary step is to start the Debug; this step only consists of typing debug [Enter] on the operative system on time. the "a" (assemble) command is used To assemble a program on

Compare and contrast two qualitative analysis approaches. You must select two that are a true contast egĀ  CAQADS (say leximancer ) v discourse analysis or thematic analysis by hand

QUESTION (a) Write down the Update Step in the Dijkstra's algorithm explaining its complexity. (b) Propose a Generic Algorithm for Depth-First Search Algorithm, assuming

Previously two sections the fundamentals of the workings and architecture of the central processing unit has been explained. There has been a common look at easy processor architec


Header contains routing and error control information Payload carries the actual user information, either voice, data or video

Block diagram of digital computer: The general pattern of computer architecture has remained unchanged over the lastĀ four decades or so. It has a single processor, which accep

Using only the digits 1-6 how many five digit numbers can be formed? How many of these have at least a 5? How many of them have either no 5 or no 6?