COP-4338, Programming III Lectures
Note: Links will not be alive until a day or two before class.
- May 4: Starting with C
- C basics: main, printf, some low-level stuff.
- Pointer Variables: The address-of operator & and an
introduction to pointers.
- May 6 and 11: More C
- Pointer variables: dereferencing * operator
- Simulating call-by-reference
- scanf
- Runaway pointers.
- Arrays
- Strings
- Pointer hopping
- Dynamic allocation of arrays
- May11.c Code from May 11
- May 13, 18, and 20: structs, I/O, files
- May 25: No class
- May 27: Discussion of Assignment #1, Macros, Functions as Parameters
- Macros/qsort: May27.c Code from May 27.
- June 1: Discussion of Assignment #2, C Review
- June 8: Exam #1: C
- June 3, 10, 15, 17, 22, 24, 29: Classes
- Simple C++
- Classes: interfaces, member functions, visibility
- Accessor/Mutator
- Const and non-const methods
- Constructors
- Initializer lists
- Implicit type conversions
- Explicit constructors
- Default parameters
- The big three: destructor, operator= and copy constructor
- *this
- Aliasing and this
- Separation of interface and implementation
- Scope :: operator
- ifndef/endif and separate compilation
- Static members
- Operator overloading
- Friends
- Constant and reference data member
- Linked data structures
- Example: The Rational class
- Reference return types and operator[]
- Code from June 22 (approximate):
IntQueue.h
IntQueue.cpp
TestQueue.cpp
- Example: The String class (Sample code from class)
- July 1 and 6: Inheritance
- Implementing a derived class
- Constructors
- Defaults for the Big Three in the derived class
- Protected members
- Slicing
- Static vs. dynamic binding
- virtual keyword
- The virtual destructor
- Various C++ differences from Java
- July 8 and 13: Templates
- Why templates
- Function templates
- Class templates: interface
- Illustration of the MemoryCell class
- Specifying the requirements of the template type
- Class templates: implementation
- Separate compilation issues
- July 15: Exam #2 Covers C++ Classes, and inheritance, but not templates
- July 20: STL
- STL Basic ideas
- Iterators
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- String streams
- Assorted code from July 20 plus stuff I didn't get to.
- July 22, 27: Threads and Synchronization
- PDF slides
- Examples:
- Illustrates basics of getting threads to run:
ThreadDemo.java
- Illustrates threads corrupting data:
NoSync.java
- Example using an Account.
Some threads do deposits, some do withdraws on shared account.
- July 29: Networking
- Aug 3: Threading and Networking Review and Review for Exam
- Aug 5: Exam #3: Covers C++ and Threading and Networking