Lecture 20 Objectives
At the end of today's class you should
KNOW:
- Under what circumstances one should consider using the visitor pattern
- That the visitor pattern makes it easy to provide additional functionality
- That the visitor pattern makes it relatively difficult to add
additional variants to the component type
BE ABLE TO:
- Use a visitor to organize a Java program such that the traversal of
a data structure is separate from the operations on each element of the
structure
Sample Exam Question:
Add a new operation to the IProc interface, using a class called HasRefs. The methods in
HasRefs return true if any of the formulas contain references.