100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 2 out of 4 pages.
05.04 Classes and MethodsName: Mishka AllamThis assignment has three parts.Part One: Design the programWrite a program to define a Superhero class, set attributes and call the methods. Use thefollowing guidelines to write your program:1.Look over the code that starts the Superhero class. You may use this code as a startingpoint. Come up withtwoadditional attributes andonemethod to add to the class. Becreative! Some attributes could be a motto, villain, strength, weakness, or alter ego. Anaction might be saveWorld() or transformHero().class Superhero:# Superhero class represents the facts related to a superhero.def __init__(self, name = "", strengthPts = 0):# Create a new Superhero with a name and other attributes.self.name = nameself.strengthPts = strengthPtsdef addStrengthPts(self, points):# Adds points to the superhero's strength.self.strengthPts = self.strengthPts + points2.Update the class by including at least two new attributes and one new method.