YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CPSC 427: Object-Oriented Programming
Handout #9
Professor M. J. Fischer
May 2, 2016
Final Exam Review Topics
Miscellaneous
C
/
C
++
features
Pointer arithmetic and its relationship to array subscripting.
Dangling pointers, shared objects, and the multiple delete problem.
Optional parameters and default values.
const
: What it means. When to use it.
Measuring run time of programs
Hardware clocks, discrete time, jiffies.
Things that can affect run times from one trial to the next.
How
StopWatch
uses derivation in reading the system clock.
Member functions and data members
Global
vs.
member functions.
What is a
static
function?
What is an embedded object? How is it deleted?
Extending operators as member functions.
Default constructor and the automatically generated default constructor.
Meaning and use of
=default
and
=delete
.
Derivation and inheritance
Why use derivation?
What is slicing?
Visibility and privacy rules.
Explicit and implicit privacy attributes.
Friendship.
Object structure.
Declaration and reference contexts.
Multiple inheritance.
Operator extensions
Extending binary operators such as
+, -, ⋆, /
.
Extending unary operators.
Defining/extending the cast operator.
Defining/extending subscript.
Defining/extending the function call operator.
Casts and conversions
Different kinds of cast.
Implicit/explicit casting.
Conversion using constructor
vs.
using cast
Handling ambiguity.
Polymorphism and virtual functions
Simple
vs.
polymorphic derivation.
Virtual functions and destructors.
Why use polymorphism?
Pure virtual functions and abstract classes.
Templates
Why use templates?
Template syntax.
Compilation issues.
Standard Template Library.
Containers.
Exceptions
C
++
exception mechanism.
Throwing and catching.
Standard exceptions.
Multiple
catch
blocks.
Rethrow.
Object-oriented design
General OO principles.
Code reusability.
What is a “wrapper” class?
What is an “adaptor” class?
The “singleton” design pattern.
The “publisher/subscriber” design pattern and callback functions.
Design patterns.
Events in Graphical User Interfaces (GUI).