Whenever folks on Earth get into trouble they look towards the Superheroes Federation to save them. Design and implement a Python class called Hero that includes the following class variable(s), instance variable(s) and method(s) for the class. Class variable(s): • TotalNumHeroes is the total number of heroes listed with the Federation • TotalNumChallengesMet is the total number of challenges that all the federation members have successfully overcome Attribute(s)/instance variable(s): • herolD is the unique ID number for the superhero (default value "N/A") • ifeName is the real-life name of the superhero (e.g. Bruce Wayne) (default value "N/A") • alterEgo is the secondary self or secret identity of the superhero (eg. Batman) (default value "N/A") • firstAppeared is the year this superhero was introduced first (e.g. 1939) (default value 0) • knownFor is the special feature for which the hero is known (e.g. can lift unusually heavy objects) (default value "N/A") • toolOfStrength is a tool or weapon that is used by the superhero (eg. hammer) (default value "N/A") • numofChallengesMet is a number that indicates how many challenges have been faced and overcome by the superhero (default value 0) The class definition should also include the following method(s): • a constructor/initializer method, including default values • accessor methods to access and return the instance variables heroiD, alterEgo, and numofChallengesMet a mutator method to update (i.e., add an amount to) the instance variable numofChallengesMet the special method_str_() to print the required information, including the herolD, lifeName, alterEgo, firstAppeared, knownFor, toolOfStrength and numofChallengesMet with appropriate descriptive labels as shown in the sample output below
Whenever folks on Earth get into trouble they look towards the Superheroes Federation to save them. Design and implement a Python class called Hero that includes the following class variable(s), instance variable(s) and method(s) for the class. Class variable(s): • TotalNumHeroes is the total number of heroes listed with the Federation • TotalNumChallengesMet is the total number of challenges that all the federation members have successfully overcome Attribute(s)/instance variable(s): • herolD is the unique ID number for the superhero (default value "N/A") • ifeName is the real-life name of the superhero (e.g. Bruce Wayne) (default value "N/A") • alterEgo is the secondary self or secret identity of the superhero (eg. Batman) (default value "N/A") • firstAppeared is the year this superhero was introduced first (e.g. 1939) (default value 0) • knownFor is the special feature for which the hero is known (e.g. can lift unusually heavy objects) (default value "N/A") • toolOfStrength is a tool or weapon that is used by the superhero (eg. hammer) (default value "N/A") • numofChallengesMet is a number that indicates how many challenges have been faced and overcome by the superhero (default value 0) The class definition should also include the following method(s): • a constructor/initializer method, including default values • accessor methods to access and return the instance variables heroiD, alterEgo, and numofChallengesMet a mutator method to update (i.e., add an amount to) the instance variable numofChallengesMet the special method_str_() to print the required information, including the herolD, lifeName, alterEgo, firstAppeared, knownFor, toolOfStrength and numofChallengesMet with appropriate descriptive labels as shown in the sample output below
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY