Classes
- Syntax for defining a class; instantiating and using class
objects
- Data members and function members
- private vs. public
- Accessors, mutators, facilitators; purpose of each and how to
implement
- Constructors:
- What is the purpose of a constructor?
- Default vs. non-default constructors
- Initialization lists for constructors
- Copy constructors:
- When is a copy constructor needed?
- Deep vs. shallow copies
- Copy constructor syntax
- Destructors:
- When is a destructor needed?
- Destructor syntax
- Use of const
- With function parameters
- With member functions
- With function return values
Operator Overloading
- Basic operator overloading:
- Overloading operator+ as member or non-member
- Overloading other basic operators (+, -, ==, unary -) as
member or non-member
- When should an operator return a const value?
- Use of friend
- Overloading operator<< and operator>> as
friend or non-friend
- Overloading the assignment operator (operator=):
- When should operator= be overloaded?
- Relationship to copy constructors
- Syntax, including protection from self copy,
returning *this
Pointers, Dynamic Memory, and Linked Lists
- Basic pointer syntax:
- How to declare a pointer
- How to get the address of a variable
- Using pointers to simulate call-by-reference
- Pointer arithmetic
- Dereference and "address of" operators
- Use of new & delete
- Dynamic arrays and delete []
- Pointers to objects:
- Use of ->
- The this pointer
- Copy constructors, desdtructors, and
overloading operator=
- Linked Lists:
- Conceptual structure of a linked list
- The Node and List classes
- Dummy nodes
- Inserting and deleting items in a list
- Searching a list
- Destructors for linked lists
Basic Inheritance
- "is a" vs. "has a" relationship
- Base and derived classes
- What is inherited by the derived class? Use
of public, private, and protected
- Syntax to define a derived class
- Constructors, destructors, and operator= in derived
classes