CS 202 Fall 2013  >  Notes for Tuesday, October 22, 2013

CS 202 Fall 2013
Notes for Tuesday, October 22, 2013

General Review

Summary of Topics Covered

Not listed in the order covered in class.

  1. Development Methodology
    • Get it to compile
    • Testing
  2. The Basics of Classes
    • member function
    • member variable
    • public, private, protected
    • object
    • objects in a container
    • accessor & mutator
    • header/source conventions
    • inline
    • constructors
      • default ctor
      • constructing members
    • destructor
    • friend functions
  3. Allocation & Compiler-Generated Functions
    • 3 kinds of allocation
    • Lifetime
    • Pointers
    • dynamic
    • non-array, array
    • RAII
    • Compiler-generated functions
    • Law of the Big Three
  4. Parameter Passing
    • 3 ways
    • Conventions for objects, simple types
    • Return values
  5. Scope, etc.
    • Scope
    • Local, member, global
    • Static members
  6. Operator Overloading
    • Function name
    • Operands
    • Precedence, associativity, arity
    • Member vs. global
    • Make non-fundamental out of fundamental
    • Special cases
      • operator++
      • operator<<, operator>>
      • operator= (member, swap trick)
  7. Object-Oriented Programming
    • Idea
    • Inheritance
    • Constructing & the base class
    • redefining base-class members
      • Access via Base::
    • Polymorphism
    • Virtual functions
      • Using with pointers
      • Using with references
      • Using with shared_ptr, make_shared
    • Class hierarchies
    • Pure virtual functions & abstract classes
    • Polymorphic objects in a container: shared_ptr, make_shared


CS 202 Fall 2013: Notes for Tuesday, October 22, 2013 / Updated: 22 Oct 2013 / Glenn G. Chappell