Review Sheet for Exam 2
Exam 2 will cover the material presented in lecture since Exam 1, any on-line lecture notes, and the following portions of your text:
- Chapter 5 (5.1-5.4, 5.6-5.8)
- Chapter 7 (7.1-7.5, 7.9-7.11, 7.14)
- Chapter 10 (10.1-10.4)
Be prepared to write much more code than on Exam 1!
Use the topics below as a GUIDE in studying for the exam.
- What a destructor is used for, its syntax, and how to write one
- What a copy constructor is, its syntax, and how to write one
- How to overload the stream output operator (<<)
- How to overload the assignment operator (=)
- The "this" pointer, what it is, when it is available, and why it is needed
- How to use stream I/O
- Friend functions
- How to use initializer lists for constructors
- Concepts of template functions and template classes, their syntax, and how to write them
- How to follow the execution of a recursive function
- How to write a recursive function
- What the following types of recursion are: direct, indirect, mutual, tail, linear, tree
- The concept of inheritance
- What public inheritance is
- The difference between the public, protected, and private class member access specifiers
- Syntax for a derived class and its member functions and how to write them
- Constructor and destructor invocation when used with a derived class
Terminology:
- base case, base class (superclass), derived class (subclass), abstract class, "is a" relationship