CPSC 225 | Intermediate Programming | Spring 2005 |
Assignments | |||
---|---|---|---|
Week 1: 1/17-1/21Topics: overview and introduction, basic program structure, conditions and loops, subroutines and functions Reading: chapters 1-3 Examples: wages.cc (basic C++ program with input and output), payout.cc (basic program, random numbers), payout2.cc (srand), cards.cc (enumerated types), inflation.cc (function prototypes, preconditions) |
|||
homework #1: Introduction to C++ and Warmup
due W 1/26 at the start of class (solutions) |
|||
Week 2: 1/24-1/28Topics: parameter passing, overloading functions, default arguments, static arrays Reading: chapters 4-5 Examples: params.cc (value and reference parameters), assert.cc (assertions), array.cc (static arrays and array parameters) |
|||
homework #2:
Functions and Parameter Passing due W 2/2 at the start of class |
|||
Week 3: 1/31-2/4Topics: classes and separate compilation Reading: chapters 6-7, 11.1 Examples: dice.h (class definition), dice.cc (class implementation), dicetester.cc (using classes and objects), yahtzeedice.h (instance variables with a class type), yahtzeedice.cc (implementing a class with instance variables of a class type), yahtzeedice2.h, yahtzeedice2.cc (implementing a class with an instance variable that is an array of a class type), yahtzeescore.h, yahtzeescore.cc, yahtzeescore2.h, yahtzeescore2.cc (two ways to begin implementing the YahtzeeScore class) |
|||
homework #3:
Tetris Board and Brain
due W 2/16 at the start of class note changed due date |
|||
Week 4: 2/7-2/11Topics: strings, files and streams Reading: chapters 9, 12 Examples: copy.cc (streams, files) |
|||
homework #4:
Random Writer due W 2/16 at the start of class |
|||
Week 5: 2/14-2/18Topics: class design, recursion Reading: chapter 13 Examples: fib.cc (recursion) |
|||
review session 6:45pm T 2/15 |
|||
exam #1 F 2/18 (solutions) |
|||
Week 6: 2/21-2/25Topics: recursion, pointers Reading: chapters 13, 10 Examples: hanoi.cc (recursion), nqueens.cc (recursion and backtracking), pointers1.cc (pointers), pointers2.cc (pointers as parameters to functions) |
|||
homework #5: Recursion due W 3/2 at the start of class |
|||
Week 7: 2/28-3/4Topics: pointers, linked data structures (linked lists, stacks, queues) Reading: chapter 10, sections 17.1-17.3 Examples: vector.h, vector.cc (classes with dynamically allocated memory), linkedlist.h, linkedlist.cc (linked list node class), linkedlistdemo.cc (creating, manipulating, and destroying a small linked list) |
|||
homework #6:
Maze Generator due W 3/9 at the start of class can be turned in any time up to R 3/10 5pm without penalty |
|||
Week 8: 3/7-3/11Topics: linked data structures (linked lists, stacks, queues) Reading: 17.1-17.3 Examples: linkedlist.h, linkedlist.cc (linked list node class), linkedlistdemo2.cc (manipulating linked lists), stackarray.h, stackarray.cc (stack - array implementation), stacklist.h, stacklist.cc (stack - linked list implementation), stacktester.cc (stack demo program), queuelist.h, queuelist.cc (queue - linked list implementation), queuetester.cc (queue demo program) |
|||
spring break 3/11-3/20 |
|||
Spring Break |
|||
Week 9: 3/21-3/25Topics: iterators, friends, linked data structures (stacks, queues, binary trees) Reading: 17.2-17.4 Examples: stackarray.h, stackarray.cc (stack - array implementation), stacklist.h, stacklist.cc (stack - linked list implementation), stacktester.cc (stack demo program), queuelist.h, queuelist.cc (queue - linked list implementation), queuetester.cc (queue demo program) |
final project groups due M 3/21 |
||
final project specifications due W 3/30 in class |
|||
homework #7:
Priority Queues and Maze Solver
due W 3/30 at the start of class |
|||
Week 10: 3/28-4/1Topics: linked data structures (binary trees) Reading: 17.4 Handouts: binary tree ADT Examples: binarytree.h, binarytree.cc (linked-structure binary tree), bstdemo.cc (binary search trees, using BinaryTree) |
|||
homework #8:
20 Questions due W 4/6 at the start of class |
final project design due W 4/13 in class |
||
Week 11: 4/4-4/8Topics: linked data structures, operator overloading Reading: chapter 8 Examples: linkedlistdemo3.cc (more examples of manipulating linked lists), fraction.h, fraction.cc, fractiondemo.cc (overloading operators) |
|||
review session 4:30pm W 4/6 |
|||
exam #2 F 4/8 (solutions) |
|||
Week 12: 4/11-4/15Topics: inheritance, polymorphism, virtual functions Reading: chapters 14-15 Examples: player.h, player.cc (generic "player" in the prisoner's dilemma game), strategies.h, strategies.cc ("players" with specific strategies in the prisoner's dilemma game - inheritance), dilemma.cc (main program for prisoner's dilemma - polymorphism), inherit.cc (constructors, destructors, and inheritance), inherit2.cc (early vs. late binding), constructordemo.cc, constructordemo2.cc, constructordemo3.cc, constructordemo4.cc (constructors and copy constructors with inheritance), asgndemo.cc, asgndemo2.cc, asgndemo3.cc (operator= and inheritance) |
|||
homework #9: Image Processing I due W 4/20 at the start of class |
final project due T 5/3 5pm |
||
Week 13: 4/18-4/22Topics: inheritance; templates & generic programming Reading: ch 16 Examples: destructordemo.cc, destructordemo2.cc, destructordemo3.cc, destructordemo4.cc (destructors and inheritance), slicingdemo.cc (slicing), dilemma2.cc (arrays & slicing), downcastdemo.cc (downcasting) |
|||
homework #10: Image Processing II due W 4/27 at the start of class |
|||
no class F 4/22 |
|||
Week 14: 4/25-4/29Topics: templates, STL & generic programming Reading: ch 19 Examples: swap.cc (templated function), pair.h, pair.cc (templated class), pairdemo.cc (using a templated class), print.cc, sort.cc, (using STL containers/iterators, writing generic code) |
|||
Week 15: 5/2-5/6Topics: STL & generic programming Reading: ch 19 Examples: caesar.cc, jumble.cc (using STL iterators/algorithms, writing generic code), wordlist.h, wordlist.cc (using STL set), unionfind.h, unionfind.cc (using STL map) |
|||
review session 2pm F 5/6 |
|||
Final Exams: 5/7-5/10 |
|||
final exam T 5/10 8:30-11:30am |