Lecture 3

Learning objectives

After this class (which reviews C++ material that you should already know!), you should be able to:

  1. Mention two benefits of data hiding.
  2. Mention which type of file typically contains the interface, and which the implementation, in C++.
  3. Give examples of some common errors with the use of pointers.
  4. Given code with incorrect use of pointers, identify the problems and correct them.
  5. Explain when "deep copy" is needed, why it is needed, and what are the typical features that need to be implemented to ensure deep copy.
  6. Explain why self-assignment can lead to incorrect code, when we overload assignment to ensure deep copy.

Reading assignment

  1. Chapter 1, sections 1.4-1.5.
  2. Lecture: C++ review.
  3. Review templates from COP 3330. Section 1.6 will help you with this material.

Exercises and review questions


Last modified: 2 Sep 2011