Week  Dates  Topics  Material  Recitations and Homework  Due  

1  1/171/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/231/27  Recursion (Factorial, writeBackward), recurrences (Fibonacci, parade counting, Spock (nchoosek)  Walls and Mirrors, 116166  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/302/3  Recursion and the divideandconquer strategy (maxArray,
binary search) Why we need to think inductively about recursive algorithms (Hanoi)  Walls and Mirrors, 166195 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/62/10  More advanced applications of recursion Efficiency (Section 3.5) 
Walls and Mirrors, 166195 
Homework 3 handout Homework 3 starter file  Homework 2 quiz Monday in class  
5  2/132/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 197206. Homework 3 solutions to study for quiz 

6  2/202/24  Objects, classes, abstract data types (Ch. 4)  Walls and Mirrors, Ch. 4 
Point.java solution Cloud.java solution Assign4.java solution  
7  2/273/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:003:00 CSB 325  There will be a quiz on Wednesday or Friday over methods in starter files for Homework 5.  
8  3/53/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/193/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/263/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/24/6  Counting, binomial coefficients, permutations  Rosen, 5.15.3 (sixth edition); 6.16.3 (seventh edition)  Fall '11 assignment on counting, with solutions  Homework 7 (written), due in class on Wed. 4/11/12  
12  4/94/13  Counting (cont), pigeonhole principle, mathematical induction  Rosen, 5.15.3 (sixth edition); 6.16.3 (seventh edition); Rosen 4.1 (sixth edition); 5.1 (seventh edition)  Homework 7 due in class on Wed. 4/11/12  
13  4/164/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/234/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 tictactoe extra credit Interface file for tictactoe class User interface for playing tictactoe Sample file giving initial tictactoe board  Second midterm: Tues 4/24 7:30 p.m. CSB 130. (Final exam: May 10, 11:501:50 in the usual classroom.) To find out time slots for all of your final exams, go to www.colostate.edu, select CSU AZ, select F for "final exam schedule" and then read off the slot from the regular meeting time of your class.  
15  4/305/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.) Tictactoe extra credit will be accepted by (10:00 PM Fri.)  
16  Finals week  Final exam: May 10, 11:501:50 in the usual classroom. 