Interactive program that plays the game hangman

Assignment Help Programming Languages
Reference no: EM13727111

Objective:

Write an interactive program that plays the game Hangman. Use the random integer function to randomly select the word to guess out of the file provided. The player must guess the letters belonging to the word. The program should terminate when either all letters have been guessed correctly (player wins) or a specified number of incorrect guesses have been made (computer wins). Use a solution array to keep track of the solution so far. Initialize the array to a string of ‘*'. Each time a letter in the word is guessed, replace the corresponding ‘*' with that letter.

1. Each part of the program should be its own function. Such as recording the guess, keeping track of the solution, etc. (Hint: A menu might be a good way to do this.)
2. Also - display on the screen what letters of the alphabet you have used so far and where you are in the solution.
3. 6 incorrect guesses will be allowed.
4. Use the data file of 80 words on Angel to randomly select a word to solve.
5. The data file name and location MUST BE: P:\Private\wordlist.txt. If you change this or do not go to this location, your program will be graded as not running.
6. No global variables.

What are you turning in?

1. A printout of your original source code.
2. A printout of you playing the game at least twice. Once with a win and one time with a lost.
3. All project files should have your Penn State ID in the name. For example, P2mrf11.cpp.
4. Upload all of your files to the drop box on Angel BEFORE the deadline.
5. If you neglect to either upload your file or turn in your paperwork, you will get a zero for the assignment.
6. At this time, this project will be worth 10% of the project grade. Project 1 will be recorded as 15%. Class grades will be evaluated after these projects are graded. The instructor will post any changes on Angel for the class.

Graded on:

• Good programming
• Neat & readable code
• Comments
• Logic
• Calculations
• Meaningful variables
• Output -results & format
• Input - prompting & use
• Functions
• Arrays
• Data files
• Does it work?
• Other

Reference no: EM13727111

Questions Cloud

Write specific formulas and functions : Write specific formulas and functions. The Commission Earned, Hourly Pay Earned (for the two hourly employees), and Payroll Amount columns require you to use IF functions.
How would your tour guide introduce him : Who would be your tour guide? The artist? The patron? Someone else? How would your tour guide introduce him/herself?
Determine if the company has a sustainable advantage : Determine if the company has a sustainable competitive advantage. If you determine that a sustainable advantage exists, support your claim. If you find it lacking, recommend actions that would secure a sustainable competitive advantage.
How globalization and technology change impacted corporation : Assess how globalization and technology changes have impacted the corporation you researched. Apply the industrial organization model and the resource-based model to determine how your corporation could earn above-average returns.
Interactive program that plays the game hangman : Write an interactive program that plays the game Hangman. Use the random integer function to randomly select the word to guess out of the file provided. The player must guess the letters belonging to the word.
Explain how you perceive personality an employee''s : Explain how you perceive personality, values, and attitudes contribute to an employee's satisfaction. Include support from your reading and research.
What were the purposes to be achieved in collective security : What were the purposes to be achieved in collective security agreements? What were the dangers to be avoided, and what were the fears?
What is the bottleneck : What is the bottleneck? Determine an appropriate plan for improving the capacity situation. Justify your plan. Write a report to the VP of Operations
Mobile technologies and commerce : Your attention in this paper can be focused on any of the following topics covered in our text: · Information Management / IT Architecture. · Database, Data, Warehouse, and Data Mining. · Networks, Collaboration, and Sustainab..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write potential function to derive valid amortized cost

Consider base 3 counter and de ne actual cost of increment operation to be number of digits which get changed. Provide a potential function which enables you to derive smallest valid amortized cost.

  Program to overload the addition assignment operator

Overload the addition assignment operator (+=), the subtraction assignment operator (-=), and the multiplication assignment operator (*=).

  Write program to allow user to enter marks of students

Write a program that allows user to key in marks of students. The number of students is determined by the user at the start of the program.

  Write down a program which asks the user for an angle

write a program that asks the user for an angle entered in radians. the program should then display the sine cosine and

  Weka follow the instruction and i will need in 24 hours

follow the instruction and i will need in 24 hours. please please give me on time and i will keep use ur

  Create application to allow user to enter a five-dgit number

Create an application that allows the user to enter a five-digit credit card number; assume that the fifth digit is the check digit. The application should use the method.

  Develop two single dimension arrays-floating-point numbers

Develop two single dimension arrays which contain 10 floating-point numbers in each array. Develop third single dimension array to hold sum.

  Program that will call a function called writedatatofile

Write a program that will call a function called writeDataToFile to prompt a user for their first name, last name and zip code, and print this information to a file called "UserData.txt".

  Create application displays number of square feet in house

Create application displays number of square feet in house. Explain and initialize the length and width of the house to 37 and 22, respectively.

  Find use of dom to change the contents of an html text box

This statement will include the names of files or sections of code within a file for which he or she has been solely responsible, and the Web address of files that are visible on the group Web server space. A response such as ‘It was basically a j..

  Create security code program-display digit-ascii character

You have been hired to create the security code program. Program must permit user to enter message, one character at a time.

  Design gui application with jframe to enter series of names

Design  GUI application with JFrame which permits user to enter series of friends' names and phone numbers. Each time user clicks the button, data entered must be written to sequential access file.

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