CS 062, Lecture 42

Visitor Pattern

See the Parser Visitor classes to illustrate how the Visitor Pattern works. The idea is that rather than building all of the operations into a collection of classes, you build in a hook that allows "Visitor" to visit the tree, getting access to whatever information is necessary to perform the operations on the tree. See ParserVisitor5.

Final wrap-up

Outline of course

  1. Object-Oriented Programming in Java (review)
  2. Analysis of Algorithms (big "O")
  3. Basic data structures and algorithms for manipulating them
  4. Sorting and searching algorithms (insertion, selection, merge, heap)
  5. GUI Programming
  6. Concurrency
  7. OO Programming in C++

The final exam will be on Friday, May 11, from 9 a.m. to noon. It will be comprehensive, but will focus mainly on material not covered on the midterm. There will be some programming, but the main focus will be on whether you understood the material that we covered.

A primary goal of this course was on the broad topics of abstraction, representation of data, and algorithms for manipulating data. These are all essential for developing the skills to write and maintain medium to large sized programs.

The material on C++ was included for several reasons:

  1. It is important to know more than one language in order to make it easier to learn more.
  2. C++ is used in many of the advanced courses in CS and is used extensively in the real world.
  3. Learning C++ requires you to acquire a better understanding of memory and how it is used in object-oriented languages, forcing you to have a deeper understanding of what is happening with your program at run-time.