Software Design Lecture Notes Fall 2004 For Tuesday you should: 1) review for exam, come with questions Scheduling question: how about taking the exam Friday? Leftovers --------- 1) binding Quiz 5 Solution --------------- class Kangaroo: def __init__(self, world): Animal.__init__(self, world) self.pouch_contents = [] def put_in_pouch(self, obj): self.pouch_contents.append(obj) world = World() kanga = Kangaroo() roo = Kangaroo() kanga.put_in_pouch(roo) Followup questions: 1) draw a UML state diagram showing the result of this code 2) draw a UML class diagram showing the relationships among Kangaroo, Animal and World Homework 9 Solutions -------------------- A couple of tips for working with GUIs: 1) use procedural abstraction to make the structure of the code reflect the structure of the GUI (_unlike_ the examples I have shown you!) 2) draw a widget hierarchy 3) organize the widgets in LR rows and TB columns 4) at the prototype stage, forget about appearance (don't spend time fine tuning, and then reorganize!) 5) the documentation is a huge pain, but if you invest some time up front, you will save time later (use a2ps to print documentation pages)