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 2014

Schedule

Links to the various pages for this class:

Wish I could do this: * Schedule

Date Lecture Recitation Reading Homework
Mon Jan 20, 2014 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 22, 2014
Fri Jan 24, 2014
Mon Jan 27, 2014

Using bash

Ch. 2: Functions, Arrays, Strings, Param. Passing HW1 due Wednesday 3:00ᴘᴍ
Wed Jan 29, 2014
Fri Jan 31, 2014
Mon Feb 3, 2014

Debugging Lab

Ch. 3: Pointers, References, new & delete
Section 11.5: Cmd-Line Arguments

 
Wed Feb 5, 2014
Fri Feb 7, 2014
Mon Feb 10, 2014 Make Lab Ch. 4: Classes HW2 due Wednesday 3:00ᴘᴍ
Wed Feb 12, 2014
Fri Feb 14, 2014
Mon Feb 17, 2014 Linked List Lab Ch. 5: Operator Overloading  
Wed Feb 19, 2014
  • Review for midterm
Fri Feb 21, 2014
  • First midterm
Mon Feb 24, 2014
  • Review the midterm
  • Inheritance (is-a) vs. composition (has-a)
  • typedef for base class alias instead of super
  • 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 (example)
  • Slicing
Valgrind Lab Ch. 6: Inheritance  
Wed Feb 26, 2014
Fri Feb 28, 2014
Mon Mar 3, 2014
  • There are no delegating ctors.
  • 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 3:00ᴘᴍ
Wed Mar 5, 2014
Fri Mar 7, 2014

Programming paradigms:

Mon Mar 10, 2014 Coverage Lab Ch. 8: Abnormal Control Flow
Wed Mar 12, 2014
Fri Mar 14, 2014

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 17, 2014 Spring Break!
Wed Mar 19, 2014
Fri Mar 21, 2014
Mon Mar 24, 2014

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 26, 2014

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 28, 2014

fstream:

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

stringstream:

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

Serialization, lack of

Mon Mar 31, 2014

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 (example)
    • 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 2, 2014
  • Review for midterm
Fri Apr 4, 2014
  • Second midterm
Mon Apr 7, 2014 Subversion Lab Ch. 7: Templates  
Wed Apr 9, 2014
Fri Apr 11, 2014
Mon Apr 14, 2014
  • 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 3:00ᴘᴍ
Wed Apr 16, 2014
Fri Apr 18, 2014
Mon Apr 21, 2014 Hash Lab  
Wed Apr 23, 2014
  • Quiz 3
  • Discuss HW6
Fri Apr 25, 2014
Mon Apr 28, 2014

Container Lab
Help with HW6

   
Wed Apr 30, 2014
Fri May 2, 2014
Mon May 5, 2014

UML Lab
Review for final exam

  HW6 due Monday 3:00ᴘᴍ
Wed May 7, 2014
Fri May 9, 2014
  • Review for final exam
  • ASCSU Surveys
Wed May 14, 2014
  • Final exam 4:10–6:10ᴘᴍ, same room as lecture

Modified: 2014-03-14T20:39

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