CS161 -- Sections 1 and 220 - McConnell   

Overview  ·  Policies and Tips  ·  Schedule  ·  Resources  ·  RamCT

Schedule - Section 1, Spring 2012

Watch for changes, announcements, homework postings and electronic handouts. Refresh your cache each time you look at this page.


Week Dates Topics Material Recitations and Homework Due
1 1/17-1/20 Introduction and Recap of CS160 material
Introduction to recursion
Factorial.java
Fibonacci.java
Spock.java
No recitations the first week of class.
Homework 1, due Friday Jan. 27, 5:00 p.m.

Homework1 starter file
By Monday: Review factorial in Walls and Mirrors; Be able to write the recursive factorial method from memory. Read about Fibonacci and Spock in Walls and Mirrors. Compile and experiment with supplied code on left as you read about them. (Quiz is possible.)
2 1/23-1/27 Recursion (Factorial, writeBackward), recurrences (Fibonacci, parade counting, Spock (n-choose-k) Walls and Mirrors, 116-166 Homework 1, quiz Monday on Fibonacci, Spock
Possible quiz Wed. on Fibonacci, Factorial code, Spock, Binary Search problem defs
Homework 1 due Friday 5:00 p.m.
3 1/30-2/3 Recursion and the divide-and-conquer strategy (maxArray, binary search)
Why we need to think inductively about recursive algorithms (Hanoi)
Walls and Mirrors, 166-195
Study guide for homework quiz Monday 1/30!!!

Homework 1 solutions, for use with quiz guide

BinarySearch.java
Homework 2 handout

Homework 2 starter file
(Corrected 1/31 to fix postcondition of printBackward)
Homework 2 solutions
Homework 1 quiz in class on Monday 10/30 (see guide on left)
Homework 2 due Friday 5:00 p.m.
4 2/6-2/10 More advanced applications of recursion
Efficiency (Section 3.5)
Walls and Mirrors, 166-195
Homework 3 handout

Homework 3 starter file
Homework 2 quiz Monday in class
5 2/13-2/17 Objects, classes, abstract data types (Ch. 4) Walls and Mirrors, Ch. 4
Homework 4 Homework 3 due Monday 10:00 p.m.

Homework 3 quiz Wednesday in class; also possible is an additional reading quiz on pages 197-206.

Homework 3 solutions to study for quiz
6 2/20-2/24 Objects, classes, abstract data types (Ch. 4) Walls and Mirrors, Ch. 4
Point.java solution
Cloud.java solution
Assign4.java solution
7 2/27-3/2 Inheritance, interfaces, exception handling Walls and Mirrors, Ch. 4
Homework 5 handout

DateInterface.java
Date.java
MomentInterface.java
DateList.java
MySort.java
dates.txt
moments.txt

There will be an extra help session on Homework 5 on Saturday, 1:00-3:00 CSB 325
There will be a quiz on Wednesday or Friday over methods in starter files for Homework 5.
8 3/5-3/9 Review Homework 5 solutions:

Moment.java solution
MomentList.java solution


Explanation of Homework 5 scoring

Grade5.java program for running grading tests

Solutions to midterm1
Midterm on Wednesday 3/7, over recap material, recursion, preconditions/postconditions and use of logic to show that a method is correct, classes, objects, inheritance, interfaces, throwing exceptions.
9 3/19-3/23 Linked lists Walls and Mirrors, Chapter 5 Homework 6

Assign6.java

IRouter.java

Packet.java

SingleList.java

DoubleList.java

Sample input file

10 3/26-3/30 Linked lists Walls and Mirrors, Chapter 5 Output you should get when you run your program on the supplied router1 input file. From Linux command line, run

java Assign6 router1 > out.txt.

Then, if you have stored the above sample in router1out.txt, run

diff out.txt router1out.txt

You have matched the output if this command produces no output.

DoubleList.java solution

SingleList.java solution

Router.java solution

Assignment 6 Grading Testcases
11 4/2-4/6 Counting, binomial coefficients, permutations Rosen, 5.1-5.3 (sixth edition); 6.1-6.3 (seventh edition) Fall '11 assignment on counting, with solutions Homework 7 (written), due in class on Wed. 4/11/12
12 4/9-4/13 Counting (cont), pigeonhole principle, mathematical induction Rosen, 5.1-5.3 (sixth edition); 6.1-6.3 (seventh edition); Rosen 4.1 (sixth edition); 5.1 (seventh edition) Homework 7 due in class on Wed. 4/11/12

13 4/16-4/20 Mathematical induction Rosen 4.1 (sixth edition); 5.1 (seventh edition) Reading guide on induction (includes written assignment from last semester) Homework 8, due in class on Friday 4/20 (Use the study guide on the reading of Section 4.1 (5.1 in seventh edition). This gives a recipe that will help you on this assignment.

The second midterm will be on April 24, 6:30 p.m. in CS130.
14 4/23-4/27 Wrapup assignment (to be posted soon); review for second midterm Homework 7 solutions

Homework 8 solutions
HW9 instructions
provided code

Midterm 2 solutions

Instructions for tic-tac-toe extra credit

Interface file for tic-tac-toe class

User interface for playing tic-tac-toe

Sample file giving initial tic-tac-toe board
Second midterm: Tues 4/24 7:30 p.m. CSB 130. (Final exam: May 10, 11:50-1:50 in the usual classroom.) To find out time slots for all of your final exams, go to www.colostate.edu, select CSU A-Z, select F for "final exam schedule" and then read off the slot from the regular meeting time of your class.
15 4/30-5/4 Combinatorial proofs; recursion revisited; program efficiency; review for final Rosen, 5.4, Prichard and Carrano 6.1, 6.3 There is no penalty for being 48 hours late on HW9 (by 10:00 AM Wed.) Tic-tac-toe extra credit will be accepted by (10:00 PM Fri.)
16 Finals week Final exam: May 10, 11:50-1:50 in the usual classroom.