pick of the day 27 Jan 2003 Lecture 11 Visitor
January Lecture 112 Outline Previous Business HW1 now available via my.wpi.edu Lecture Contents Iterator Design Pattern Visitor Design Pattern New Business Java AWT help session Monday 7:00 PM (FL 311) Java Help Sessions Tuesday 5:00 – 7:00 (Annex) Regular TA office hours still valid
January Lecture 113 Iterator Access all elements of an aggregate without revealing its internal structure Whiteboard Element elements[] = new Element [10]; for (int i =0 ; i < 10; i++ ) { Element e = elements[i]; }
January Lecture 114 Visitor Motivation Set example without Visitor Discussion
January Lecture 115 Visitor Design Pattern Abstract base Visitor class Double dispatch Better encapsulation Analysis
January Lecture 116 Tuesday Assignments Review design patterns singleton, iterator, visitor Prepare for Midterm HW2 due on Thursday
January Lecture 117 References Visitor College Freshman Study Behavior