CPSC 225 Intermediate Programming Fall 2006

CPSC 225 Syllabus

 AssignmentsImportant Dates

Week 1: 8/28-9/1

Topics: course mechanics; overview and introduction; basic program structure, conditions and loops, subroutines and functions

Reading: Savitch ch 1-3 (read during the first week)
Plan to do the readings before class on the day listed, so that class time can be spent on addressing questions and trickier topics.


  • nim.cc (basic program structure, I/O, functions, assertions, programming/commenting conventions)
  • assert.cc (assertions for checking preconditions)
  • palindrome.cc (functions, fun with mod and integer division)
  • coinflip.cc (random numbers, pow, type casting, constants)


  homework #0: see announcements
due W 8/30
lab #1: C++ Nuts and Bolts homework #1: Natural Prestidigitation
due R 9/7 8:45am

Week 2: 9/4-9/8

Topics: arrays, parameter passing, function overloading

Reading: Savitch ch 5 (Mon); 4.1-4.2 (Wed)


  • array.cc (automatic arrays, arrays as function parameters)
  • refparam.cc (reference parameters)
  • mastermind.cc (arrays, reference parameters, program design with functions)



lab #2: Functions and Arrays homework #2: Sudoku Solver
due R 9/14 8:45am
(sample solution)

Week 3: 9/11-9/15

Topics: classes and objects

Reading: Savitch 6.1-6.2, 7.1-7.2 (Mon)
Skim section 6.1 - you won't be asked to write structs, but you should recognize what they are if you see them.



lab #3: Classes and Objects homework #3: Scrbl
due M 9/25 11:59pm

Week 4: 9/18-9/22

Topics: program design with classes, strings, files

Reading: Savitch ch 9, 12.1-12.3 (Fri)
In chapter 9, focus on section 9.3 and the "Character-Manipulating Functions" section of 9.2; it's worth skimming the rest in order to be aware of the concept of C-strings and that there are ways to do I/O with individual characters should >> not meet your needs.

Optional Reading: Savitch 12.4


lab #4: Bug Hunt
new deadline: R 10/5 8:45am

Week 5: 9/25-9/29

Topics: strings, review, exam, pointers

Reading: Savitch 10.1 (Fri)


  • copy.cc (working with files, commandline arguments, reading individual characters)
  • copy2.cc (streams as function parameters)
  • oracle.cc (reading entire lines)
  • freqcount.cc (character-manipulation functions)


  • scrbl comments: instance variables vs. local variables vs. parameters, const methods, variable commenting, factoring out repetition, use of assertions for error-checking, and class design (PDF)
  homework #4: Darwin's World
new deadline: design due M 10/2 5pm
program/journal due R 10/26 8:45am
  midterm #1
in class Wed 9/27
review information
(solutions - PDF)

Week 6: 10/2-10/6

Topics: pointers, dynamically-allocated arrays, Vector ADT, dynamically-allocated memory and classes, operator overloading, friends

Reading: Savitch 10.2 (Mon), 10.3 (Wed), 8.1-8.3 (Fri)
In section 8.3, focus on the "Overloading >> and <<" and "The Assignment Operator" sections; skim the rest.



  • bug hunt comments: paying attention to comments, developing array algorithms, testing boundary cases (PDF)
lab #5: Pointers, Dynamic Memory Allocation, and Classes  

Week 7: 10/9-10/13

Topics: linked lists

Reading: Savitch 17.1 (Wed)


  no class Mon 10/9 (fall break)
lab #6: Maze Class  

Week 8: 10/16-10/20

Topics: linked lists, List ADT

Reading: There is no new reading for this week.


  • maze comments: allocating/deallocating 2D arrays, memory management in classes with dynamically-allocated memory, comments/preconditions, working with files, >> vs. get, avoiding repetition (PDF)
lab #7: Priority Queue  

Week 9: 10/23-10/27

Topics: stacks and queues, variations of linked lists and arrays

Reading: Savitch 17.2 (Mon)


    midterm #2
take-home due Wed 11/1 in class
review information
(solutions - PDF)

Week 10: 10/30-11/3

Topics: templates, inheritance

Reading: Savitch 16.1-16.2 (Wed), ch 14 (Fri)

Optional Reading: Savitch 16.3


  no class Mon 10/30
lab #8: Priority Queue Template homework #5: Maze Solver
new: this is a bonus homework, due T 11/21 5pm

Week 11: 11/6-11/10

Topics: inheritance, polymorphism, binding

Reading: Savitch ch 15 (Mon)


  homework #6: Image Processing
due R 11/16 8:45am

Week 12: 11/13-11/17

Topics: inheritance, recursion

Reading: Savitch ch 13 (Wed)


lab #9: Fractals homework #7: Boggle
due F 12/8 11:59pm

Week 13: 11/20-11/24

Topics: recursion

Reading: no new reading


  no class Wed 11/22 or Fri 11/24, no lab Thu 11/23 (Thanksgiving break)

Week 14: 11/27-12/1

Topics: maze solving, binary trees

Reading: Savitch 17.3 (Wed)


Week 15: 12/4-12/8

Topics: binary trees, wrapup, review

Reading: Savitch 17.3



Reading Period & Exams: 12/9-12/15

super deadline
no work accepted after Thu 12/14 11:30am
final exam
take-home due Thu 12/14 11:30am
review information

Valid HTML 4.01!