COP-4338, Programming III Lectures
Note: Links will not be alive until a day or two before class.
- Jan 6: Starting with C
- C basics: main, printf, some low-level stuff.
- Pointer Variables: The address-of operator & and an
introduction to pointers.
- Jan 8 and 13: More C
- Pointer variables: dereferencing * operator
- Simulating call-by-reference
- scanf
- Runaway pointers.
- Arrays
- Strings
- Pointer hopping
- Dynamic allocation of arrays
- Jan15a.c Code from Jan 15
- Jan20.c Code from Jan 20
- Jan 22, 27: structs, I/O, files
- Structs: Jan22a.c Code from Jan 22 (fixed class bug (missing & in scanf)).
- Structs: Jan22b.c Has bugs that need fixing next week
- dirent.h
- Jan 29: More C... C Preprocessor
- Feb 3: Discussion of Assignment #1, C Review
- Feb 5: Exam #1: C
- Feb 10, 12, 17, 19, 24: 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[]
- Feb 26 and 3: 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 5 and 10: 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
- Mar 12: Exam #2 Covers C++ Classes, and inheritance, but not templates
- Mar 17 and 19: SPRING BREAK; NO CLASSES
- Mar 24 and 26: STL
- STL Basic ideas
- Iterators
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- String streams
- Code from Mar 24
- Mar 31, Apr 2, and 7: 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.
- Apr 9: Networking
- Apr 14: URL class, Intro to server-side scripts
- Apr 16: Threading and Networking Review and Review for Exam
-
THURSDAY APRIL 23 9:45 AM - 11:45 AM: Final Exam Covers C++ and Threading and Networking