COP-4338, Programming III Lectures
Note: Links will not be alive until a day or two before class.
- May 5: Starting with C
- C basics: main, printf, some low-level stuff.
- Pointer Variables: The address-of operator & and an
introduction to pointers.
- May 7 and 12: More C
- Pointer variables: dereferencing * operator
- Simulating call-by-reference
- scanf
- Runaway pointers.
- Arrays
- Strings
- Pointer hopping
- Dynamic allocation of arrays
- May12.c Code from May 12
- May 14, 19, and 21: structs, I/O, files
- Strings continued: May14a.c Code from May 14.
- Structs: May14b.c Code from May 14.
- Structs: May19.c Code from May 19.
- Structs: May21.c Code from May 21.
- May 26: No class
- May 28: Discussion of Assignment #1, Macros, Functions as Parameters
- Macros/qsort: May28.c Code from May 28.
- June 2: Discussion of Assignment #2, C Review
- June 9: Exam #1: C
- June 4, 11, 16, 18, 23, 25, 30: 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 25 (approximate):
IntQueue.h
IntQueue.cpp
TestQueue.cpp
- Example: The String class (Sample code from class)
- July 2 and 7: 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 9 and 14: 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 16: Exam #2 Covers C++ Classes, and inheritance, but not templates
- July 21: STL
- STL Basic ideas
- Iterators
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- String streams
- Assorted code from July 21 plus stuff I didn't get to.
- July 23, 28: 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 30: Networking
- Aug 4: Threading and Networking Review and Review for Exam
- Aug 6: Exam #3: Covers C++ and Threading and Networking