YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE

 CPSC 427: Object-Oriented ProgrammingHandout #9
Professor M. J. Fischer   May 2, 2016



 

Final Exam Review Topics

Miscellaneous C/C++ features

  1. Pointer arithmetic and its relationship to array subscripting.
  2. Dangling pointers, shared objects, and the multiple delete problem.
  3. Optional parameters and default values.
  4. const: What it means. When to use it.

Measuring run time of programs

  1. Hardware clocks, discrete time, jiffies.
  2. Things that can affect run times from one trial to the next.
  3. How StopWatch uses derivation in reading the system clock.

Member functions and data members

  1. Global vs. member functions.
  2. What is a static function?
  3. What is an embedded object? How is it deleted?
  4. Extending operators as member functions.
  5. Default constructor and the automatically generated default constructor.
  6. Meaning and use of =default and =delete.

Derivation and inheritance

  1. Why use derivation?
  2. What is slicing?
  3. Visibility and privacy rules.
  4. Explicit and implicit privacy attributes.
  5. Friendship.
  6. Object structure.
  7. Declaration and reference contexts.
  8. Multiple inheritance.

Operator extensions

  1. Extending binary operators such as +, -, ⋆, /.
  2. Extending unary operators.
  3. Defining/extending the cast operator.
  4. Defining/extending subscript.
  5. Defining/extending the function call operator.

Casts and conversions

  1. Different kinds of cast.
  2. Implicit/explicit casting.
  3. Conversion using constructor vs. using cast
  4. Handling ambiguity.

Polymorphism and virtual functions

  1. Simple vs. polymorphic derivation.
  2. Virtual functions and destructors.
  3. Why use polymorphism?
  4. Pure virtual functions and abstract classes.

Templates

  1. Why use templates?
  2. Template syntax.
  3. Compilation issues.
  4. Standard Template Library.
  5. Containers.

Exceptions

  1. C++ exception mechanism.
  2. Throwing and catching.
  3. Standard exceptions.
  4. Multiple catch blocks.
  5. Rethrow.

Object-oriented design

  1. General OO principles.
  2. Code reusability.
  3. What is a “wrapper” class?
  4. What is an “adaptor” class?
  5. The “singleton” design pattern.
  6. The “publisher/subscriber” design pattern and callback functions.
  7. Design patterns.
  8. Events in Graphical User Interfaces (GUI).