COP-4338, Programming III Lectures
- June 26: The Object class, Reflection, and the Proxy Pattern
- Object class PDF slides
- Reflection PDF slides
- Illustration of the correct way to override
equals, hashcode, toString,
- Illustration of using reflection to invoke main
- Using accessible fields to get private data
- Illustration of the proxy pattern.
Shows generation by hand, generation by using Java 1.3 dynamic proxies,
and an approximation of what
the dynamic proxy is actually producing for you behind the scenes
- July 1: Threads and Synchronization
- PDF slides
- Illustrates basics of getting threads to run:
- Illustrates threads corrupting data:
- 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:
- July 3 (first half)
- Discuss Assignment #1
- More on multithreading
- July 3: Networking
- July 8: Serialization
- July 8: Garbage Collection
- Java Developer Connection Article
shows that soft references don't stay around for a long time.
shows a factory class that hands out Foo objects
(from a pre-allocated pool),
but requires that the client release the objects back to the pool.
shows a factory class that hands out Foo objects,
but does not require that the client release the objects.
Instead it uses weak references to detect orphaned Foo objects,
and reclaims those orphans for the pool.
- July 10: Review of Java Material
- July 10: C++ Basics, arrays, strings, files
- C++ Notes, avaialable only from fiu.edu domains.
- Part 1
- Part 2
- Part 3
- Code for C++; will be updated as course proceeds
- Simple C++, and compiling functions
- vector class.
- resizing and push_back
- string class.
- Parameter passing: call by constant reference.
- July 15: Pointers and Reference Variables
- new and delete
- Reference variables
- July 17: Exam #1: Java
- July 15 and 22: Classes
- Classes: interfaces, member functions, visibility
- Separation of interface and implementation
- Default parameters
- Scope :: operator
- ifndef/endif and separate compilation
- Const and non-const methods
- Implicit type conversions
- Explicit constructors
- Initializer lists
- Static members
- Operator overloading
- The big three: destructor, operator= and copy constructor
- Constant and reference data member
- Linked data structures
- Aliasing and this
- Example: The Rational class
- Reference return types and operator
- July 24: 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
- A Set class (uncommented):
(the last file is for separate compilation of templates).
- An LSet (linked list version) class (uncommented):
- Function Objects
- Reference return types
- July 24: Inheritance
- Implementing a derived class
- Defaults for the Big Three in the derived class
- Protected members
- Static vs. dynamic binding
- virtual keyword
- The virtual destructor
- Various C++ differences from Java
- July 29: STL
- Pointer variables and their relation to primitive arrays
- Primitive strings
- STL Basic ideas
- Lists vs Vectors
- The Pair pattern
- Sets and maps
- The concordance example
- String streams
- July 29: Native Methods in C and C++
- July 31: Programming in C
- Final Exam: Thu August 7.