attach an already coded and fully debugged calculator objectyou'll begin to better understand the power of this paradigm if we code all of our gui components as classesthey automatically become library of reusable widgetswhich we can combine in other applications as often as we like extending class components when guis are built with classesthere are variety of ways to reuse their code in other displays to extend hello instead of attaching itwe just override some of its methods in new subclass (which itself becomes specialized frame widgetthis technique is shown in example - example - pp \gui\intro\gui py from tkinter import from gui import hello class helloextender(hello)def make_widgets(self)extend method here hello make_widgets(selfbutton(selftext='extend'command=self quitpack(side=rightdef message(self)print('hello'self dataredefine method here if __name__ ='__main__'helloextender(mainloop(this subclass' make_widgets method here first builds the superclass' widgets and then adds second extend button on the rightas shown in figure - figure - customized class' widgetson the left because it redefines the message methodpressing the original superclass' button on the left now prints different string to stdout (when searching up from selfthe message attribute is found first in this subclassnot in the superclass) :\pp \gui\intropython gui py hello hello hello hello but pressing the new extend button on the rightwhich is added by this subclassexits immediatelysince the quit method (inherited from hellowhich inherits it from reusable gui components with classes