In-Class Examples for CISC-2000-E01

For some reason, throwing and catching C++ exceptions were not on the list of topics I was given.

  1. Pointers
    1. Binary (base 2) and hexadecimal (base 16) notation for a whole number
    2. A pointer is a variable that contains the address of another variable.
    3. Linux commands.
  2. Dynamic memory allocation with new and delete is used if we don’t know when we’re writing the program
    1. how many array elements we will need
    2. how many variables we will need
    3. what order we need to create and destroy the variables in. This will matter when we have constructors and destructors.
  3. Classes.
    1. Data members and member functions. Static data members. Examples:
      1. Class date
      2. Class stack
      3. Class random
    2. Public vs. private members
    3. Two implementations of a class with the same functionality
    4. Header files, inline member functions
    5. Static member functions vs. friend functions.
  4. Operator overloading.
    1. Operators that use the value of an existing object: ==
    2. Operators that change the value of an existing object: +=
    3. Operators that create a new object: binary +
  5. Inheritance and polymorphism.
    1. Single inheritance and polymorphism
    2. Multiple inheritance and virtual base classes
    3. Abstract base classes and pure virtual functions
    4. Public inheritance vs. private inheritance
  6. Templates.
    1. Template functions
    2. Template classes