Date
| Lecture
| Recitation
| Reading
| Homework
|
---|
Mon Jan 16, 2012
| MLK Day
|
- Help with HW0
- Logging in
- Editing files
- Using g++
Attend as needed this week only
|
All reading is from Weiss Ch. 0: Introduction Ch. 1: Basic Types & Control Structures
Do the reading before class for the week.
| HW0 due Saturday 5:00ᴘᴍ
|
Wed Jan 18, 2012
|
|
Fri Jan 20, 2012
|
- Java/C++ differences
- “That's C, not C++”
int main()
int /char /float /double /bool
- Declaration looks like use
- scope: local/global/
{}
- C++ doesn’t have a stack
|
Mon Jan 23, 2012
|
- Discuss HW1
- stack vs. heap vs. static memory
const
if /while /for
using namespace std;
<stdio.h> vs. <cstdio>
- intro to iostreams
- Casting,
old & new style
|
Using bash
| Ch. 2: Functions, Arrays, Strings, Param. Passing
| HW1 due Wednesday 5:00ᴘᴍ
|
Wed Jan 25, 2012
|
|
Fri Jan 27, 2012
|
- Review HW1
- functions
- call-by value/reference/const reference
- passing arrays
- function overloading
- default parameters
- Overloaded functions; name mangling using nm & c++filt
|
Mon Jan 30, 2012
|
- vector
- member functions
- «vector::max_size(cpp)» vs. «vector::size(cpp)» vs. «vector::capacity(cpp)»
- vector vs. C-style arrays
- pointers/references and addresses, pointer scaling/arithmetic
new /delete /new[] /delete[]
- garbage collection
NULL /0
- dangling/stale pointers
- double
delete
- abandoned memory
alpha->beta vs. gamma.delta
|
Debugging Lab
|
Ch. 3: Pointers, References, new & delete Section 11.5: Cmd-Line Arguments
|
|
Wed Feb 1, 2012
|
- Today is the last drop day
- Quiz 1
- HW2, which will be much harder than HW1.
- Command-line arguments
|
Fri Feb 3, 2012
|
|
Mon Feb 6, 2012
|
struct vs. class
- data members
- function members (methods)
public /protected /private , friends
| Make Lab
| Ch. 4: Classes
| HW2 due Wednesday 5:00ᴘᴍ
|
Wed Feb 8, 2012
|
|
Fri Feb 10, 2012
|
|
Mon Feb 13, 2012
|
- C++ is extensible, not mutable
- Operator overloading, member vs. non-member
| Linked List Lab
| Ch. 5: Operator Overloading
|
|
Wed Feb 15, 2012
|
|
Fri Feb 17, 2012
|
|
Mon Feb 20, 2012
|
- Review the midterm
- Inheritance (is-a) vs. composition (has-a)
- Calling methods in base class (example)
- Base class in initialization list
copy ctor in derived class calls copy ctor in base class
operator= in derived class calls operator= in base class
typedef for base class alias instead of super
- Slicing
| Valgrind Lab
| Ch. 6: Inheritance
|
|
Wed Feb 22, 2012
|
|
Fri Feb 24, 2012
|
|
Mon Feb 27, 2012
|
- Copy ctor vs. operator= (example)
using Loud.h
- Member vs. non-member functions in Complex
private (lousy default)/public /protected inheritance
- Multiple inheritance
- Friendship is not inherited
- There is no
Object class.
- Reflection:
typeid() & type_info (example)
|
gtkmm lab
|
| HW3 due Wednesday 5:00ᴘᴍ
|
Wed Feb 29, 2012
|
|
Fri Mar 2, 2012
|
Programming paradigms:
|
Mon Mar 5, 2012
|
| Coverage Lab
| Ch. 8: Abnormal Control Flow
|
|
Wed Mar 7, 2012
|
|
Fri Mar 9, 2012
|
Namespaces:
- Access a whole namespace:
using namespace std;
- Access a class:
using std::ofstream;
- Access a symbol:
using std::cout;
- The std namespace:
std::string
- The global namespace:
::bar
<math.h> vs. <cmath>
- Namespaces are open, classes are closed
std is closed, anyway
- Nested namespaces
- The anonymous namespace
- Libraries & namespaces
- Namespace aliases:
namespace HP = Hewlett_Packard;
- Symbol resolution & namespace ambiguity
|
Mon Mar 12, 2012
| Spring Break!
|
Wed Mar 14, 2012
|
Fri Mar 16, 2012
|
Mon Mar 19, 2012
|
ios:
- State: «ios::good(cpp)» / «ios::eof(cpp)» / «ios::fail(cpp)» / «ios::bad(cpp)»
- ios has no
open() method
- Misuse of «ios::eof(cpp)»
- Stream as a
bool / void *
| New Lab
| Ch. 9: Input & Output
| HW4 due Wednesday 5:00ᴘᴍ
|
Wed Mar 21, 2012
|
ostream:
- «ostream::put(cpp)» / «ostream::write(cpp)»
- «ostream::seekp(cpp)» / «ostream::tellp(cpp)»
- manipulators (formatted output example)
istream:
- «istream::get(cpp)» / «istream::unget(cpp)» / «istream::peek(cpp)»
istream::get() vs. cin >> c
- «istream::getline(cpp)»
- «istream::ignore(cpp)»
- «istream::seekg(cpp)» / «istream::tellg(cpp)»
|
Fri Mar 23, 2012
|
fstream:
- Misuse of «fstream::open(cpp)»
stringstream:
- «stringstream::str(cpp)»
- Using stringstream for general conversion
Serialization, lack of
|
Mon Mar 26, 2012
|
RAII:
- It’s a Design Pattern
- Acquisition - Use - Release
- Use RAII when you think “Don’t forget to ...”
- Simplicity of description/state
- Immune to early return/throw
- Examples:
- autoptr to dynamic memory
- file handle / socket / database / other OS resources
- mutex (lock)
- list membership
Mixins:
- is-a, but not really
- Make the ctor/dtor
protected
- override new/delete
- noncopyable / noninstantiatable
- loudness for debugging
- timestamp
- ID number
- serialization
- Alternative ways to achieve the same goal
| I/O Lab
|
|
|
Wed Mar 28, 2012
|
|
Fri Mar 30, 2012
|
|
Mon Apr 2, 2012
|
| Subversion Lab
| Ch. 7: Templates
|
|
Wed Apr 4, 2012
|
- Templates use Duck Typing
- A class can provide: methods, variables, constants, types
- Iterators:
|
Fri Apr 6, 2012
|
- Standard containers (STL):
|
Mon Apr 9, 2012
|
- Non-standard containers:
- slist
- rope
- hash_set / hash_multiset / hash_map / hash_multimap
- unordered_set / unordered_multiset / unordered_map / unordered_multimap
- Common container methods:
- ctor(iter, iter)
- ctor(n)
- empty()
- size()
- clear()
- begin() / end() / rbegin() / rend()
| Template Specialization Lab
|
| HW5 due Wednesday 5:00ᴘᴍ
|
Wed Apr 11, 2012
|
|
Fri Apr 13, 2012
|
|
Mon Apr 16, 2012
|
| Hash Lab
|
|
|
Wed Apr 18, 2012
|
|
Fri Apr 20, 2012
|
|
Mon Apr 23, 2012
|
|
Alpha Op Lab Help with HW6
|
|
|
Wed Apr 25, 2012
|
|
Fri Apr 27, 2012
|
|
Mon Apr 30, 2012
|
|
UML Lab Review for final exam
|
| HW6 due Monday 5:00ᴘᴍ
|
Wed May 2, 2012
|
|
Fri May 4, 2012
|
- Review for final exam
- ASCSU Surveys
|
Mon May 7, 2012
|
- Final exam 7:30–9:30ᴀᴍ, same room as lecture
|