Problem 1 Create a class called Hangman with the field n (number of incorrect guesses (int)). • include an_init__ method to initialize the field value • include a_str_ method that returns a string representation of the hangman (i.e., the stick figure representing the number of incorrect guesses) • include a method called incorrectGuess() that increases the value of n by 1

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

please answer in python 

Problem 1
Create a class called Hangman with the field n (number of incorrect guesses (int)).
• include an_init_method to initialize the field value
• include a_str_method that returns a string representation of the hangman (i.e., the
stick figure representing the number of incorrect guesses)
• include a method called incorrectGuess() that increases the value of n by 1
Transcribed Image Text:Problem 1 Create a class called Hangman with the field n (number of incorrect guesses (int)). • include an_init_method to initialize the field value • include a_str_method that returns a string representation of the hangman (i.e., the stick figure representing the number of incorrect guesses) • include a method called incorrectGuess() that increases the value of n by 1
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,