COP-4338, Programming III Lectures
Note: Links will not be alive until a day or two before class.
- Jan 10: Administrivia
- Jan 10, 12, 17, 19, 24, 26:
C++ Basics, arrays, strings, files, pointers, reference variables
- Read Chapters 1, 2, 3, and 11.
- Simple C++, and compiling functions
- vector class.
- resizing and push_back
- string class.
- Parameter passing: call by constant reference.
- Pointers
- new and delete
- Reference variables
- C-style arrays and strings
- Jan 31 and Feb 2
- More C structs, pointers, etc.
- Feb 14: Assignment #1 and Review of C for Exam
- Feb 16: Exam #1 Lots of C and no C++
- Feb 2, 7, 9, 21, 23, 28: 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)
- Mar 2: 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
- Mar 7: Review
- Mar 9: Exam #2: Covers C++ classes functions, and pointers
- Mar 14, 16: 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
- Mar 21 and 23: Spring Break
- Mar 28: STL
- STL Basic ideas
- Iterators
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- String streams
- Mar 30: C++ Review
- Apr 4: Exam #3: Covers C++ entirely and some C
- Apr 6, 11, 13: 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.
- Apr 13 and 18: Networking
- Apr 20: Threading and Networking Review and Review for Exam
- Apr 25: Final Exam