#Author:  James Tam
#Version: November 27, 2025

#Learning:
#1) Define__str__ method to return current object state (value of attributes)
#2) Define an __init__ constructor to specify value of an attribute during object creation.

class CatNoStr:
    def __init__(self):
        self.mood = "Blah"
        self.motivators = "Feed me, play with me, let me sleep"

class Cat:
    #Mood can be set to non-default value
    def __init__(self,aMood):
        self.mood = aMood
        self.motivators = "Feed me, play with me, let me sleep"

    def __str__(self):
        myState = ""
        myState = myState = "My mood: " + self.mood + "\t"
        myState = myState + "My motivators: " + self.motivators + "!"
        return(myState)
        

aCat = CatNoStr()
print("No __str__ method...", end="")
print(aCat,end="\n--\n") #no __str__ method, object state (value of attributes) not displayed


tigger = Cat("Really blah")
print("__str__ method implemented...", end="")
print(tigger) #Automatically calls the __str__ method
