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

Central processing unit, Central Processing Unit: A Central Processing...

Central Processing Unit: A Central Processing Unit (CPU) in a computer system is an extremely fast device as compared to the main memory, but it can not work on its own. It de

Special-purpose and general-purpose computers, SPECIAL-PURPOSE AND GENERAL-...

SPECIAL-PURPOSE AND GENERAL-PURPOSE COMPUTERS In general, there are two types of digital computers. The first is the special-purpose digital computer, which performs a f

The central processing unit (cpu), THE CENTRAL PROCESSING UNIT (CPU): T...

THE CENTRAL PROCESSING UNIT (CPU): The CPU is the heart of any computing system.  It executes the individual machine instructions, which make up a program. The CPU is formed fr

Discrete math, Below you will find a question the areas of automata. Solve ...

Below you will find a question the areas of automata. Solve the problem showing all steps. Thoroughly explain how and why you performed each step with complete sentences. A finite

What are the commonly used input/output functions in c, Problem 1 What ...

Problem 1 What is the significance of the keyword 'extern' in a function declaration? Explanation of significance of Keyword 'extern' in function declaration Probl

Uniform path cost search-artificial intelligence, Uniform Path Cost Search-...

Uniform Path Cost Search-Artificial intelligence A breadth first search will search the solution with the shortest path length from the first state to the goal state. Though, t

System software, Name and explain the classifications of computers

Name and explain the classifications of computers

Software, Software: A computer system consists of two parts - hardware...

Software: A computer system consists of two parts - hardware and software. The first part, computer hardware, refers to all the visible components of the computer system:  key

Keystroke logger and data-stealing, Keystroke logger and Data-stealing: ...

Keystroke logger and Data-stealing: Keystroke loggers: This is a program, once installed on the system, which intercepts the keys when entering the password or the Credit Ca

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