Penn Foster 037852 – Hangman Game with screenshots – Perfect Solution – Instant Delivery

Lab Price = $25
Please feel free to send us your queries at: [email protected]
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement
FINAL GRADED PROJECT
OVERVIEW
Now that you’ve completed the lessons and required textbook reading, you’re ready to
put it all together for the final project. This project is a final assessment on the entire
course and covers all the lessons. This is a new Windows application not based on the
output of any previous graded projects. You may find it helpful to review the instructions
for previous graded projects and the completed output from the Lesson 5 graded project.
Make sure that you follow all directions completely and verify your results before submitting
the project. Remember to include all required components in your solution.
YOUR PROJECT
You’ve been tasked to create an educational game for a fifth-grade reading class. The
game must test students’ spelling skills using a variation of the classic game HangMan.
If you’re unfamiliar with the rules and general game play, please consult the online reference
at http://en.wikipedia.org/wiki/HangMan_(game) for more information.
Database
The application will use the HangManDB.mdf file. The HangManDB database contains
the tables in Figure 1. The UnitID column in the Words table is a foreign key to the ID
column in the Units table. The Word column contains the actual word to guess, while the
Description column contains the description of words for that unit.
FIGURE 1—HangManDB Database Tables
© PENN FOSTER, INC. 2018 FINAL GRADED PROJECT PAGE 3
Graded Project
User Interface
The user interface will consist of a single Windows form. The user interface will resemble
Figure 2.
When the application first loads, the textbox for the letter guess should be disabled, as
shown in Figure 2. If the New option is chosen in the menu, then a new word and the unit
description should be loaded from the database. If the Quit option is chosen in the menu,
then the application should quit.
After each guess, one of two things should happen. If it’s a correct guess, then all occurrences
of that letter should appear in the labels at the bottom. If it’s an incorrect guess,
then the next stage of the HangMan should appear in the picture box. In either case,
the textbox should highlight the letter so the user can make another guess. The textbox
should not be cleared or the user may attempt to guess the same letter (Figure 3).
The game ends when either all letters of the word are guessed correctly or the HangMan
picture is completed. When the game is won (Figure 4) or lost (Figure 5), a message box
should display, prompting to play again.

FIGURE 3—User Makes Correct and Incorrect Guesses
FIGURE 4—Message When User Wins
FIGURE 5—Message When User Loses
© PENN FOSTER, INC. 2018 FINAL GRADED PROJECT PAGE 5
Graded Project
In either case, clicking the Yes button should have the same effect as clicking the New
option in the menu, and clicking the No button should exit the application.
APPLICATION FILES
This application will consist of the following files in the Solution Explorer:
1. GameForm.vb. The only form in the application.
2. HangManDB.mdf. The database that contains the questions and unit descriptions.
3. Images folder. The images needed for the different visual states of the HangMan.
4. QuestionDataSet.xsd. The DataSet for the HangManDB database. Should contain
both Words and Units tables.
You’ll be provided with the following files:
QQ The HangManDB.mdf database
QQ The Images folder that contains the image files HangMan-0.png, HangMan-1.
png, HangMan-2.png, HangMan-3.png, HangMan-4.png, HangMan-5.png, and
HangMan-6.png
QQ The HelperMethodsCode.txt file with suggested code
INSTRUCTIONS
1. In Visual Studio, create a new Windows Forms Application project named
HangManApp.
2. Create the Images folder in the project by using the Add > New Folder option in
the Solution Explorer or the New Folder option in the Project menu.
3. Add each HangMan image to the Image folder. You can either click and drag them
into the Solution Explorer or use the Add > Existing Item… option and select all
images using the Shift key. If using the second method, make sure to change the
filter to All Files (*.*).
4. In the Properties panel, set the Copy To Output Directory property to Copy
Always for each image file. You can use the Shift key to select all image files at
once.
5. Add the HangManDB.mdf database to the project. Use the Add > Existing Item…
option. Make sure to change the filter to All Files (*.*).
6. In the Data Source Configuration Wizard dialog, choose the DataSet option and
then click the Next button.

7. Check the checkbox next to Tables and then click the Finish button. This will create
a default dataset named HangManDBDataSet with the Units and Words data
tables.
8. Rename the Form1.vb file to GameForm.vb.
9. Click the Yes button in the dialog to rename the Form1 class as well.
10. Create the user interface for GameForm.vb. See the previous User Interface section
for the layout. The form will consist of the following controls:
a. One MenuStrip control that contains the Game menu with the options New
and Quit
b. One Label control for instructions with the text Guess a letter; 14-point-font
recommended
c. One Label control for the unit description
d. One TextBox control for the user to type in letter choices
e. A PictureBox control that will display the HangMan images. You’ll set the
ImageLocation property to load the HangMan images.
f. A Panel control that will contain the displayed letter labels
g. Eleven Label controls, one for each letter of the word. These labels should
be in the panel and will have an initial placeholder until the user guesses
a letter.
You can choose to set the control properties to whatever you like, but some helpful
suggestions follow
11. In the body of GameForm, you should define the following variables:
a. dsQuestions. A HangManDBDataSet object
b. numWord. The index of which word is being guessed
c. strWord. The actual word being guessed
d. numRightGuesses. Number of right guesses in a game
e. numWrongGuesses. Number of wrong guesses in a game
f. blnGameStarted. Indicates whether the game has started or not
12. In the body of GameForm, you should define the following utility methods:
a. A method named CheckProgress that calculates the total number of tries
(numRightGuesses + numWrongGuesses), displays the correct message
box for winning or losing, and starts the next game or exits the application
depending on the message box button clicked
b. A method named WonGame that checks whether each letter in the word is
matched by its label and returns True if this is the case
© PENN FOSTER, INC. 2018 FINAL GRADED PROJECT PAGE 7
Graded Project
c. A method named LostGame that checks to see if the number of wrong
guesses is greater than six and returns True if this is the case
d. A method named ResetAllLabels that sets each character label to blank
text
13. Open the HelperMethodsCode.txt file and copy and paste its contents into the
GameForm class.
Note: These handy methods will reduce your development time. Think of it as help
from a colleague, because you’ll rarely develop a business application alone and
most often will work within a team.
14. In the body of GameForm, you should have the following event procedures:
a. Form Load event handler—Disables the txtGuess textbox, initializes num-
Word to -1 to indicate no word has been chosen, and calls the LoadData
method
b. Quit button Click event handler—Exits the application
c. In the New button Click event handler, perform the following tasks:
I. Initialize all variables, especially numRightGuesses, numWrong-
Guesses, blnGameStarted, and numWord. Make sure to increment
numWord to the next index. Each game will increment this number by
one.
II. Initialize controls. Clear the text of all controls, including the labels,
textbox, and picture box. For the picture box, you can just set its
ImageLocation to “ “.
III. Enable and set the focus of the txtGuess textbox.
IV. Set controls using the DataSet. If you followed the same names, then
you can use this code:
‘Gets word column row
strWord 5 CStr(dsQuestions.Words(numWord)(1))
‘Gets unit description lblUnitDescription.Text 5 _
CStr(dsQuestions.Words(numWord).UnitsRow(1))
V. Set the Text property to the underscore character (_) for each label control
based on the number of characters in the word.
d. In the txtGuess textbox TextChanged event, perform the following tasks:
I. Check if the game is started using the blnGameStarted variable and
that the txtGuess textbox contains a value. Clearing a textbox will trigger
a TextChanged event, so you’ll need to verify a letter was typed by
the user.

II. Check to see if the word (strWord) contains the guess (txtGuess).
III. If it does, then call the SetRightLetterLabels method and increment
the numRightGuesses variable.
IV. If it doesn’t, set the image in the pboxHangMan and increment the
numWrongGuesses variable.
Your code should resemble the following:
pboxHangMan.ImageLocation 5 “images\HangMan-” &
numWrongGuesses & “.png”
numWrongGuesses 15 1
V. Check to see if the game has been won or lost yet. Use the
CheckProgress method.
VI. Select the text in the txtGuess textbox.
10. Save and run the application. Verify that all controls and menus work correctly.
You’ll submit the compiled application for this project.
GRADING CRITERIA
Your project will be graded using the following rubric:
The form uses the correct UI layout. 20 points
The New menu option performs the correct behavior. 10 points
The Exit menu option performs the correct behavior. 10 points
The questions and unit description load correctly. 20 points
The game plays correctly. 20 points
The game displays the correct win and lose message boxes. 10 points
The compiled application is included and runs. 10 points
TOTAL 100 points
SUBMITTING YOUR PROJECT
You’ll submit the HangManApp.exe file for your project. To find this file, you should go
to directory to where you saved the HangManApp project and copy the HangManApp.
exe file from the bin\Debug folder. Make sure the HangManApp.exe file executes before
submission. The Images folder and HangManDB.mdf must be in the same directory as
the HangManApp.exe to execute as expected.
© PENN FOSTER, INC. 2018 FINAL GRADED PROJECT PAGE 9
Graded Project
Each project is individually graded by your instructor and therefore takes up to a few
weeks to grade.
To submit your graded project, follow these steps:
1. Go to http://www.pennfoster.edu.
2. Log in to your student portal.
3. Click on Take Exam next to the lesson you’re working on.
4. Follow the instructions provided to complete your exam.
Be sure to keep a backup copy of any files you submit to the school!

Relevant Material
Screenshots
037852: Hangman Lose Game
037852: Hangman Lose Game
037852: Hangman Won Game
037852: Hangman Won Game
Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on [email protected]
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.
Payment Details
Lab Price = $25
Please feel free to send us your queries at: [email protected]
Payment methods

Add to Cart

Buy Now

View Cart

Leave a Reply