| Class |
Chapters |
Topics |
Comments/Assignments/Links |
| 1 |
1 & 2 |
Expressions
-
syntax and value; Variables - meaning, syntax, types,
local/global/static; type promotion/ automatic typecasting.
|
We
followed Constant and Variable types, Expressions and operators from http://www.its.strath.ac.uk/courses/c/ |
| 2 |
3 |
Functions - arguments, return values, inline, recursion; Structures; Pointers and arrays - syntax, meaning, pointer arithmetic, examples, use case/advantages of pointer; Main function; Example of static variable in function; Completed operators not covered in class #1; Math standard library functions. | skipped
enumerations and reference from text |
| 3 |
4 |
Namespaces
- syntax, meaning, examples, use cases; Introduce
scoping operator ::, new and delete operators ; Class
- members, constructor, destructor, visibility; Program structure
- h files, cpp files; Overview of make process - compilation,
linking; Libraries. |
skipped
namespace alias, unnamed namespace as too specific skipped string and stream library (I/O related and formatting) for later skipped makefile in overview of make process; Promoted class before Ch 5 because of its conceptual relationship to namespace. Apologies to Daoqi Yang for changing the flow. |
| 4 |
5 & 6 |
Class -
definition, members, methods, meaning of method call on object, public
and private, constructor, destructor, non default constructors,
static members - example and use case, member initial list (introduced
: ) Difference of definition and declaration; Operator overloading. also introduce default parameters to methods and functions - examples and use case. |
Note:
delayed introduction of default value of arguments from Ch 3 because it
has a lot in common with the concept of overloading. Note: skipped pointer to method and Section 6.5 "deferred overloading" as too specific Please find a sample program for matrix class |
| 5 |
7 & 8 |
Templates
- classes, functions, multiple arguments, usage example Inheritance - virtual functions & destructor, member visibility, types of inheritance, use of inheritance |
Assignment #1
due February 21. Please find a sample program for vector template and a metaprogramming sample for factorial |
| 6 |
Review |
Check the option
valuation binomial tree program |
|
| 7 |
9 &
10.1 |
Exceptions: keywords try,
catch, throw and examples. Uses of exceptions - non local error handling, fine grained error handling; Standard library template classes and their common methods: vector, list, stack, queue, map, set; efficiency considerations in choice of data structure. Iterators - usage, examples, reverse, forward, and const. Quick introduction to sort algorithm to be covered next time. |
Suggested problems:
10.4.2; 10.4.6 in the Yang text book. Template example programs: Example first program at Stroustrup's C++ site Example program that prints a vector< vector<T> > Also check SGI's site at bottom. |
| 8 |
10.2 |
||
| 9 |
10.3 |
||
| 10 |
10.4 |
||
| 11 |
11.1
& 11.2 |
||
| 12 |
11.3
& 11.4 |
||
| 13 |
11.5
& 11.6 |
||
| 14 |
Review |