1. hour Java Demeter: traversals and visitors Example of UML notation Container with one item Container = Item. Item = Weight. Weight = Integer. Count Weight define traversal and visitor simulate program Container with several items Container = List. List : Empty | NonEmpty. Empty = . NonEmpty = Item List. Item = Weight. Weight = Integer. simulate again ======================================== 2. hour learning map Software Design and Development: Concepts class methods traversals visitors class diagrams grammars Notations Java for methods and most of visitors UML for class diagrams: defines Java classes EBNF-like notation for textual class diagrams and grammars Demeter notation for traversals Processes steps you go through to develop software design and implementation steps -------------- grammars: intro with tree example (for hw 1) also average example program for trees. 2 visitors =============================================== 3. hour Most important oo skills (among top 12) Design object interactions Lots of objects need to interact for different purposes. Each purpose has its own "important" objects. Put a structure into objects (using a class diagram) so that for each purpose, the important objects can be easily located using traversals. Add visitors to the traversals at the classes of the "important" objects. Assign responsibilities to classes Understand class libraries Average with 3 visitors and nesting: print partial results See hw 2. host and visitor classes call dependencies between visitors ! to host ? from host x without host host/visitor diagram ==================== C Counting S Summing A Average hosts/visitors C S A Container before x ? x Weight A calls S A calls C ----------------