In-Class Examples for CISC-2000-E01

  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 the operators new and delete.
    1. Allocate an array with an unpredictable number of elements.
    2. Allocate an unpredictable number of variables.
  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