ICS 65 Fall 2011
Schedule


I'd like this course, being an elective course, to be flexible in accommodating your needs. To allow this flexibility, the schedule will be built as we go along, depending on our progress (and, perhaps toward the end, your areas of interest). I will try to keep the lecture schedule and readings at least a week ahead of us, so you'll know what to expect, at least in the short term.

All assigned readings are from the Savitch text. It is a good idea to skim the assigned reading before the lecture for the main ideas, attend lecture, and then to go through the assigned reading again to fill in the details that you missed, both in your initial skim of the reading and in the lecture. Early in the quarter, you'll find that there will be a lot of assigned reading; this is because we'll cover the material in the early chapters of the text very quickly, since it is so similar to the analogous material in Java. You should be able to get through these early readings fairly quickly, though it would not be a good idea to skip them, since there are subtle differences between C++ and Java that can cause serious problems if you're unaware of them.

Some lectures will have little or no reading corresponding to them. In some cases, this is because a block of reading corresponds to more than one lecture. In other cases, the material covered in that lecture is not discussed in the textbook.

Date Lecture Topics Readings Project Due
Week 0
Th 9/22
  • Ch. 1
  • Ch. 2
Week 1
Tu 9/27
  • The main() function
  • Basic data types and control structures
  • Declaration vs. definition
  • Functions and parameters
  • Separation compilation and linking
  • The #include directive
Th 9/29
  • Strings (the C++ way)
  • Simple console input/output
  • Implicit type conversion (briefly)
  • Function overloading (briefly)
  • Default arguments
  • Stack-allocated vs. dynamically-allocated objects (briefly)
  • References
  • Passing objects as parameters: by value vs. by reference
  • Using const with variables and parameters
  • Ch. 3
  • Ch. 4
Week 2
Tu 10/4
  • Introduction to C++ memory layout
  • Pointers — and how they're different from references in both Java and C++
  • Memory allocation with new
  • Cleaning up your own resources: the delete operator
  • Ch. 10.1
Th 10/6
  • Classes
  • Access control (public and private)
  • Member variables and member functions
  • The this pointer
  • Separating interface from implementation
  • Constructors
  • Using const with objects and member functions
  • Ch. 6.2
  • Ch. 11.1
  • Ch. 7.1 - 7.2
  • Ch. 10.3
Week 3
Tu 10/11
  • Static members
  • Managing object lifetime
  • Destructors
  • Copy constructors
Th 10/13
  • Overloading the assignment operator
  • Guarding against self-assignment
  • Building a "well-behaved" Queue class
Week 4
Tu 10/18
  • Building a "well-behaved" Queue class
  • Namespaces
  • using directives
  • using declarations
  • Ch. 11.2
Th 10/20
  • std: the Standard C++ Library
  • Standard collections: vector and list
  • Iterators
  • Generic algorithms
  • Lambda expressions
  • Ch. 19
F 10/21 Project #1 due 11:59pm
Week 5
Tu 10/25
  • Inheritance
  • Constructors and destructors in derived classes
  • Order of construction and destruction of class members
  • Virtual functions and polymorphism
  • Ch. 14
  • Ch. 15
Th 10/27
  • Why destructors sometimes need to be virtual, but constructors don't (and can't)!
  • "Pure" virtual functions and abstract base classes
  • Implicit type conversions
  • Explicit constructors
Week 6
Tu 11/1
  • The problem with C-style casts
  • C++ casting (briefly)
  • Friend classes and friend functions
  • Ch. 8.1 - 8.3
Th 11/3
  • Operator overloading
  • Ch. 12
F 11/4 Project #2 due 11:59pm
Week 7
Tu 11/8
    • Template functions
    • Why C++ provides lousy error messages when you misuse a template
    • Template classes
  • Ch. 16.1
Th 11/10
  • Template classes (continued)
  • Templatizing our "well-behaved" Queue class
  • The "polymorphic clone" technique
Week 8
Tu 11/15
  • Enumerations
  • Cyclic dependencies in header files
  • Forward class declarations
  • Private and protected inheritance
Th 11/17
    • Exceptions and exception handling
    • Why exceptions affect design more profoundly in C++ than in Java
    • Exception specifications
    • Exceptions thrown from constructors and destructors
F 11/18 Project #3 due 11:59pm
Week 9
Tu 11/22
  • Class Holiday. Take a Break — NO CLASS TODAY
  • Ch. 18
Th 11/24
  • University Holiday: Thanksgiving — NO CLASS TODAY
Week 10
Tu 11/29
  • The "resource acquisition is initialization" (RAII) technique
  • The shared_ptr template from the C++ Standard Library
  • Multiple inheritance
  • The "diamond inheritance problem"
  • Virtual inheritance
Th 12/1
  • Final lecture: Open-ended conversation
F 12/2 Project #4 due 11:59pm
Finals Week
NO FINAL EXAM