an interface for us before we dothoughlet' add some logic adding behavior so farour class is just datait replaces dictionary keys with object attributesbut it doesn' add much to what we had before to really leverage the power of classeswe need to add some behavior by wrapping up bits of behavior in class method functionswe can insulate clients from changes and by packaging methods in classes along with datawe provide natural place for readers to look for code in senseclasses combine records and the programs that process those recordsmethods provide logic that interprets and updates the data (we say they are object-orientedbecause they always process an object' datafor instanceexample - adds the last-name and raise logic as class methodsmethods use the self argument to access or update the instance (recordbeing processed example - pp \preview\person py class persondef __init__(selfnameagepay= job=none)self name name self age age self pay pay self job job def lastname(self)return self name split()[- def giveraise(selfpercent)self pay *( percentif __name__ ='__main__'bob person('bob smith' 'software'sue person('sue jones' 'hardware'print(bob namesue payprint(bob lastname()sue giveraise print(sue paythe output of this script is the same as the lastbut the results are being computed by methods nownot by hardcoded logic that appears redundantly wherever it is requiredbob smith smith adding inheritance one last enhancement to our records before they become permanentbecause they are implemented as classes nowthey naturally support customization through the inheritance search mechanism in python example - for instancecustomizes the last step stepping up to oop