Skip to the content of the web site.

Lecture materials

IEEE Spectrum Magazine    MIT Technology Review    Wired Magazine    EDN Network    EE Times    Skeptic's Guide to the Universe

Early functions

Author: Douglas Wilhelm Harder and Prof. Hiren Patel

  1. Course welcome (PDF)
  2. Programming fundamentals
  3. Addresses and pointers
  4. Algorithms and templates
  5. Classes
  6. Linked lists
  7. Inheritance and polymorphism

1. Programming fundamentals

Topic Slides PDF Notes Assembly
1 Hello world! Slides PDF Notes
2 Anatomy of a program Slides PDF Notes
3 Literal data Slides PDF Notes
4 Identifiers Slides PDF Notes
5 Arithmetic operators Slides PDF Notes
6 Console output Slides PDF Notes
7 Functions Slides PDF Notes
8 Compile-time errors Slides PDF Notes
9 Comparison operators Slides PDF Notes
10 Conditional statements Slides PDF Notes
11 Logical operators Slides PDF Notes
12 Local variables Slides PDF Notes
13 The call stack Slides PDF Notes
14 Console input Slides PDF Notes
15 Repetitious operators Slides PDF Notes
16 While loops Slides PDF Notes
17 Do-while loops Slides PDF Notes
18 For loops Slides PDF Notes
19 The break statement Slides PDF Notes
20 Structured programming theorem Slides PDF Notes
21 Comments Slides PDF Notes
22 Code-development strategies Slides PDF Notes
23 Binary and hexadecimal Slides PDF Notes
24 Integer data types Slides PDF Notes
25 Floating-point data types Slides PDF Notes
26 Bit-wise and -shift operators Slides PDF Notes
27 The const keyword Slides PDF Notes
28 Main memory Slides PDF Notes
29 Arrays Slides PDF Notes
30 Character arrays (strings) Slides PDF Notes
31 Default values of parameters Slides PDF Notes
32 References and aliases Slides PDF Notes

Up to this point, you have seen the following keywords, and you should be familiar with their use:

     return
     if          else        while       for         do          break
     bool        true        false
     void
     char        short       int         long
     signed      unsigned
     float       double
     const
     class
     throw

     goto

2. Addresses and pointers

Topic Slides PDF Notes Assembly
1 Addresses and pointers Slides PDF Notes
2 Dynamic memory allocation Slides PDF Notes
3 Pointers as arguments and return values Slides PDF Notes
4 Problems with pointers Slides PDF Notes
1. Wild pointers Slides PDF Notes
2. Dangling pointers Slides PDF Notes
3. Memory leaks Slides PDF Notes
5 Dynamic allocation of arrays Slides PDF Notes
6 Protecting pointers Slides PDF Notes
7 Pointer arithmetic Slides PDF Notes

3. Algorithms and templates

Topic Slides PDF Notes Assembly
1 Algorithms and templates Slides PDF Notes
2 Recursive functions Slides PDF Notes
3 Linear search Slides PDF Notes
4 Binary search Slides PDF Notes
5 Recursive binary search (optional topic) Slides PDF Notes
6 Selection sort Slides PDF Notes
7 Insertion sort Slides PDF Notes
8 Counting sort (optional topic) Slides PDF Notes
9 Templates Slides PDF Notes

4. Classes

The following are introductions to classes using specific examples:

Topic Slides PDF Notes Assembly
1 Introduction to classes (optional topic) Slides PDF Notes
2 Member functions (optional topic) Slides PDF Notes
3 Operator overloading (optional topic) Slides PDF Notes
4 The string class (optional topic) Slides PDF Notes
5 Constructors (optional topic) Slides PDF Notes
6 Throwing exceptions (optional topic) Slides PDF Notes
7 Encapsulation (optional topic) Slides PDF Notes
8 Class variables (optional topic) Slides PDF Notes
9 Destructors (optional topic) Slides PDF Notes
10 Dynamic allocation of classes (optional topic) Slides PDF Notes
11 this (optional topic) Slides PDF Notes
12 An array class (optional topic) Slides PDF Notes
13 An array class: constructor and destructor (optional topic) Slides PDF Notes
14 An array class: copy and assignment (optional topic) Slides PDF Notes
15 Searching and sorting arrays (optional topic) Slides PDF Notes
16 Some standard templated classes (optional topic) Slides PDF Notes
17 The string class (?) (optional topic) Slides PDF Notes

5. Linked lists

Topic Slides PDF Notes Assembly
1 Issues with arrays Slides PDF Notes
2 Introducing classes and linked lists Slides PDF Notes
3 Introducing nodes Slides PDF Notes
4 Linked lists Slides PDF Notes
5 A list_size member variable Slides PDF Notes
6 Pushing at the back (optional topic) Slides PDF Notes
7 A templated linked list (optional) Slides PDF Notes
8 A copy constructor and assignment operator (optional) Slides PDF Notes
9 An iterator (optional) Slides PDF Notes
10 A doubly-linked list (optional) Slides PDF Notes

6. Inheritance and polymorphism

Topic Slides PDF Notes Assembly
1 Inheritance (optional topic) Slides PDF Notes
2 Throwing exceptions (optional topic) Slides PDF Notes
3 Polymorphism (optional topic) Slides PDF Notes

9. Additional topics

Topic Slides PDF Notes Assembly
1 Namespaces (optional topic) Slides PDF Notes
2 Pseudo-random numbers (optional topic) Slides PDF Notes
3 Static variables (optional topic) Slides PDF Notes