Lectures

Lecture notes are provided as PDF files.

Lec Date Files Notes
1 8/26 Introduction Slides
Top Programming Languages
We reviewed the syllabus in class. Be sure you are familiar with the course policies!
2 8/31 C++ Primer, Part 1
slide_ex.cpp
  • Introduction to the C/C++ language
  • Demonstration of tools for working with GL
  • Review arithmetic operators, precedence, and associativity on your own
3 9/2 C++ Primer, Part 2
scope.cpp
func.cpp
  • Expressions and scope
  • Conditionals, blocks, loops
  • Functions
4 9/9 Arrays and Pointers
array_example.cpp
char_array_example.cpp
ptrs.cpp
  • Arrays
  • Arrays with functions
  • Pointers
5 9/14 new_example.cpp
array_example.h
array_example.cpp
Makefile for array_example
  • Arrays and Pointers wrap-up
  • See updated slides from lecture 4
6 9/16 Classes and Objects, Part 1
7 9/21 Classes and Objects, Part 2
Dinosaur.cpp
  • Class and object review
  • Accessors, Mutators, Facilitators
8 9/23 Classes and Objects, Part 3
dino.cpp
Dinosaur.h
Dinosaur.cpp
  • Constructors
  • Aggregation
  • Using const and static
9 9/28 Exceptions
  • Dynamic memory and classes
  • Destructors
  • Call by reference
  • Exceptions
10 10/12 Operator Overloading, Part 1
  • Review of function overloading
  • Basic operator overloading
11 10/14 Operator Overloading, Part 2

CalendarItem example
  • Friend methods
  • Overloading the insertion operator
  • Overloading unary operators
  • Example code demonstrates operator overloading
12 10/19 Copy and Assignment

Car example (zip file)
  • Copy constructors
  • Overloading the assignment operator
  • Example code demonstrates Copy constructor, assignment operator, Destructor, and overloaded insertion operator
13 10/21 Inheritance

SUV example
  • Basic inheritance
  • Overriding vs. overloading
  • Example demonstrates basic inheritance
14 10/26 Polymorphism, Part 1

ElectricCar example (zip file)
  • Basic Polymorphsim
  • Static vs. Dynamic Binding
  • Example code demonstrates basic polymorphism
15 10/28 Polymorphism, Part 2
  • Polymorphism and Destructors
16 11/9 Templates, Part 1
  • Function templates
17 11/11 Templates, Part 2
  • Class templates
18 11/16 Iterators and STL
  • Standard Template Library (STL)
  • Iterators
19 11/23 Requested Topics
driver.cpp
Matrix.h
Matrix.cpp
  • 2-d arrays
  • Dynamic memory
  • Templates
  • Use of const, &, and *
20 11/30 Complexity and Recursion
search.cpp
  • Running-time and Big-O notation
  • Basic recursion
  • Linear vs. binary search
20 12/2 C++11
Sample Code (zip)
  • Some useful C++11 features