Colorado State University

This file defines the header for each page. An optional "icon" image (I use the textbook):

A link to enable editing of this page: Edit TopBar Replace this with info about this class:

CS253: Problem Solving with C++

Spring 2012

Schedule

Links to the various pages for this class:

Wish I could do this: * Schedule

Date Lecture Recitation Reading Homework
Mon Jan 16 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:00PM
Wed Jan 18
Fri Jan 20
  • 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
  • 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:00PM
Wed Jan 25
Fri Jan 27
  • 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
  • vector
  • 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
  • Today is the last drop day
  • Quiz 1
  • HW2, which will be much harder than HW1.
  • Command-line arguments
Fri Feb 3
Mon Feb 6
  • struct vs. class
  • data members
  • function members (methods)
  • public/protected/private, friends
Make Lab Ch. 4: Classes HW2 due Wednesday 5:00PM
Wed Feb 8
Fri Feb 10
Mon Feb 13
  • C++ is extensible, not mutable
  • Operator overloading, member vs. non-member
Linked List Lab Ch. 5: Operator Overloading  
Wed Feb 15
  • Review for midterm
Fri Feb 17
  • First midterm
Mon Feb 20
  • 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
Fri Feb 24
Mon Feb 27
  • 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:00PM
Wed Feb 29
Fri Mar 2

Programming paradigms:

Mon Mar 5 Coverage Lab Ch. 8: Abnormal Control Flow  
Wed Mar 7
Fri Mar 9

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 Spring Break!
Wed Mar 14
Fri Mar 16
Mon Mar 19

ios:

New Lab Ch. 9: Input & Output HW4 due Wednesday 5:00PM
Wed Mar 21

ostream:

istream:

Fri Mar 23

fstream:

stringstream:

Serialization, lack of

Mon Mar 26

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
  • Review for midterm
Fri Mar 30
  • Second midterm
Mon Apr 2 Subversion Lab Ch. 7: Templates  
Wed Apr 4
Fri Apr 6
Mon Apr 9
  • 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:00PM
Wed Apr 11
Fri Apr 13
Mon Apr 16 Hash Lab    
Wed Apr 18
  • Quiz 3
  • Discuss HW6
Fri Apr 20
Mon Apr 23

Alpha Op Lab
Help with HW6

   
Wed Apr 25
Fri Apr 27
Mon Apr 30

UML Lab
Review for final exam

  HW6 due Monday 5:00PM
Wed May 2
Fri May 4
  • Review for final exam
  • ASCSU Surveys
Mon May 7
  • Final exam 7:30–9:30AM, same room as lecture

Page: Main.Schedule
Modified: May 03, 2012, at 04:32 PM
Wiki: pmwiki-2.2.35
CS Department
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2011 Colorado State University