figure the bookmarks program the user interface is all set up in the main window' initializerwhich we will review in five parts because it is fairly long class mainwindowdef __init__(selfparent)self parent parent self filename none self dirty false self data {menubar tkinter menu(self parentself parent["menu"menubar for this windowinstead of inheriting widget as we did in the preceding examplewe have just created normal python class if we inherit we can reimplement the methods of the class we have inheritedbut if we don' need to do that we can simply use composition as we have done here the appearance is provided by creating widget instance variablesall contained within tkinter frame as we will see in moment we need to keep track of four pieces of informationthe parent (applicationobjectthe name of the current bookmarks filea dirty flag (if true this means that changes have been made to the data that have not been saved to disk)and the data itselfa dictionary whose keys are bookmark names and whose values are urls to create menu bar we must create tkinter menu object whose parent is the window' parentand we must tell the parent that it has menu (it may seem strange that menu bar is menubut tk has had very long evolution which