CS253

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

Replace this with info about this class:

CS253: Problem Solving with C++

Spring 2013

Schedule

Links to the various pages for this class:

Wish I could do this: * Schedule

Date Lecture Recitation Reading Homework
Mon Jan 21, 2013 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 3:00ᴘᴍ
Wed Jan 23, 2013
Fri Jan 25, 2013
Mon Jan 28, 2013
  • 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 3:00ᴘᴍ
Wed Jan 30, 2013
Fri Feb 1, 2013
Mon Feb 4, 2013
  • 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 6, 2013
Fri Feb 8, 2013
Mon Feb 11, 2013
  • struct vs. class
  • data members
  • function members (methods)
  • public/protected/private, friends
Make Lab Ch. 4: Classes HW2 due Wednesday 3:00ᴘᴍ
Wed Feb 13, 2013
Fri Feb 15, 2013
Mon Feb 18, 2013 Linked List Lab Ch. 5: Operator Overloading  
Wed Feb 20, 2013
  • Review for midterm
Fri Feb 22, 2013
  • First midterm
Mon Feb 25, 2013
  • 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 27, 2013
Fri Mar 1, 2013
Mon Mar 4, 2013
  • 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

   
Wed Mar 6, 2013
Fri Mar 8, 2013

Programming paradigms:

Mon Mar 11, 2013 Coverage Lab Ch. 8: Abnormal Control Flow HW3 due Wednesday 3:00ᴘᴍ
Wed Mar 13, 2013
Fri Mar 15, 2013

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 18, 2013 Spring Break!
Wed Mar 20, 2013
Fri Mar 22, 2013
Mon Mar 25, 2013

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 3:00ᴘᴍ
Wed Mar 27, 2013

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 29, 2013

fstream:

  • Misuse of «fstream::open(cpp)»

stringstream:

  • example
  • «stringstream::str(cpp)»
  • Using stringstream for general conversion

Serialization, lack of

Mon Apr 1, 2013

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 Apr 3, 2013
  • Review for midterm
Fri Apr 5, 2013
  • Second midterm
Mon Apr 8, 2013 Subversion Lab Ch. 7: Templates  
Wed Apr 10, 2013
Fri Apr 12, 2013
Mon Apr 15, 2013
  • 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  
Wed Apr 17, 2013
Fri Apr 19, 2013
Mon Apr 22, 2013 Hash Lab   HW5 due Monday 3:00ᴘᴍ
Wed Apr 24, 2013
  • Quiz 3
  • Discuss HW6
Fri Apr 26, 2013
Mon Apr 29, 2013

Alpha Op Lab
Help with HW6

   
Wed May 1, 2013
Fri May 3, 2013
Mon May 6, 2013

UML Lab
Review for final exam

  HW6 due Monday 3:00ᴘᴍ
Wed May 8, 2013
Fri May 10, 2013
  • Review for final exam
  • ASCSU Surveys
Thu May 16, 2013
  • Final exam 4:10–6:10ᴘᴍ, same room as lecture

Modified: 2013-04-20T12:36

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building