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

Description of external hardware interruptions, External interruptions are...

External interruptions are produced by peripheral devices, for example keyboards, printers, communication cards, etc. They are also produced by coprocessors. It is not achievable t

Explanation of different graphics applications, Problem 1 What are grap...

Problem 1 What are graphic applications? Explanation of different graphics applications Problem 2 Open the case cover of your CPU of your computer system and l

Multiplexing, draw the diagram to implement 32*1 mux by using 3 relevant ty...

draw the diagram to implement 32*1 mux by using 3 relevant type of mux

ICT IN BUSINESS, Explain how ICT can be used for achievement of each of the...

Explain how ICT can be used for achievement of each of the following business objectives, illustrating your answer with examples: 1. Customer intimacy 2. Low-cost leadership

Database, how does one create a database in mysql

how does one create a database in mysql

A* search-artificial intelligence, A* Search-Artificial intelligence:  ...

A* Search-Artificial intelligence:   A* search combines the best parts of uniform cost search that  called the fact that it's optimal and complete, and the best parts of gre

Power point, how to start ms power point

how to start ms power point

What are the goals of wap architecture, Question 1 Explain the naming conv...

Question 1 Explain the naming conventions of functions in WML scripts and also explain characteristics of functions in WML Question 2 What is WML input field? Explain WML

Explain the process of fetching a word from the memory, Question 1 Explain...

Question 1 Explain the functional units of a basic computer with a neat diagram Question 2 Explain how you can get 1's complement of a given binary number? Also explain 1'

Differentiate Preemptive and Nonpreemptive Scheduling?, The Scheduling algo...

The Scheduling algorithms can be divided into two parts with respect to how they deal with clock interrupts. 1) Nonpreemptive Scheduling: A scheduling

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