COP-4338, Programming III Lectures
Note: Links will not be alive until a day or two before class.
- May 9: Starting with C
- C basics: main, printf, some low-level stuff.
- Pointer Variables: The address-of opeator & and an
introduction to pointers.
- May 11 and 16: More C
- Pointer variables: dereferencing * operator
- Simulating call-by-reference
- scanf
- Runaway pointers.
- Arrays
- Strings
- Pointer hopping
- Dynamic allocation of arrays
- May 18, 23 and 25: structs, I/O, files
- May18.c Code from May 18
- May23.c Code from May 23
- May23a.c Code from May 23 directories (still
needs to be fixed on Thursday. Has several subtle bugs.
- May25.c Code from May 25
- command.c Code from June 1
- May 30: Discussion of Assignment #1, Macros, Functions as Parameters
- June 1: Simple C++
- June 6: Review of C for Exam 1
- June 8: Exam #1
- June 13, 15, 20, 22, 27: Classes
- 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[]
- Example: The String class (Sample code from class)
- June 27 and 29: 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 4: No Class
- July 6: Review
- July 11: Exam #2 Covers C++ Classes, and inheritance, but not templates
- July 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
- Function Objects
- Exceptions
- Reference return types
- matrix
- July 18: STL
- STL Basic ideas
- Iterators
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- String streams
- July 20, 25: Threads and Synchronization
- PDF slides
- Examples:
- Illustrates basics of getting threads to run:
ThreadDemo.java
- Illustrates threads corrupting data:
NoSync.java
- Series of examples using an Account.
Some threads do deposits, some do withdraws on shared account.
- Two examples with multiple monitors
- Static methods have different monitors than instance methods:
StaticsAndThreads.java
- July 27: No class
- Aug 1 and 3: Networking
- Aug 8: Threading and Networking Review and Review for Exam
- Aug 10: Exam #3: Covers C++ and Threading and Networking