

class Puppy:

    # Default Constructor
    #  Constructor without input arguments
    # Initialize to age = 0, name of "Fido"
    def __init__(self):
        self.age = 0
        self.name = "Fido"

    # define how this should print in a print statement
    def __str__(self):
        return self.name+"("+str(self.age)+")"


    # These are standard "setters" and "getters" 
    def setName(self, n):
        self.name = n
    
    def setAge(self, a):
        self.age = a;

    def getName(self):
        return self.name

    def getAge(self):
        return self.age

myPuppy = Puppy();
myPuppy.setName("Tommy");
myPuppy.setAge(2);
myAge = myPuppy.getAge();

print("Value of myAge: " + str(myAge));

# no need to delete in Python - it will reclaim garbage collection
myPuppy = Puppy();
myPuppy.setName("Fluffy");
myPuppy.setAge(5);
print( "MyPuppy: "+ str(myPuppy.getAge()) + ", " + myPuppy.getName());
print("MyPuppy: " + str(myPuppy));

print("Name: "+myPuppy.name);


