Computer Science 126
General Computer Science
Fall 2012


Course Information | People | Assignments | Lectures | Precepts | Exams | Booksite

Precepts

Here is the tentative schedule of precepts. Links will be updated throughout the term. All Exercise numbers refer to Introduction to Computer Science by R. Sedgewick and K. Wayne. The textbook Introduction to Programming in Java: An Interdisciplinary Approach contains Chapters 1–4. The remaining chapters are unpublished.

Worksheets. The worksheets are .pdf files suitable for on-line viewing or printing (for hand-written completion of the programming exercise).

Code for exercises. This fill-in-the-blank code can be copied and pasted into DrJava for convenient completion of the programming exercise. If an Exercise number is listed in the header comments, then the solution code is on the Booksite.

Recommended exercises. These include exercises done during precept and exercises to be done independently.

# DATE TOPICS WORKSHEETS CODE FOR EXERCISES RECOMMENDED EXERCISES
1 9/13, 9/14 Intro, HelloWorld,
Command-line Arguments
First Programs
Assignment Guidelines
HelloWorld
NameAge
NextYear
NameAge Solution
NextYear Solution
1.1.1–4
1.2.7
2 9/18, 9/19 Data Types
(Bring textbook to precept.)
Data Types WindChill
Distance
ThreeSort
1.2.4, 1.2.6, 1.2.9, 1.2.13, 1.2.16, 1.2.20 (hint: study Program 1.2.5 on p.33), 1.2.25, 1.2.30, 1.2.34, WebExercise 1.2.1
3 9/20, 9/21 Conditionals and Loops Conditionals and Loops
Debugging
RollDie
RollLoadedDie
Buggy1FivePerLine
Buggy2FivePerLine
Buggy3FivePerLine
Buggy4FivePerLine
1.3.7, 1.3.8, 1.3.13, 1.3.16 (Booksite 1.3.15), 1.3.20, WebExercises 1.3.1, 1.3.2
4 9/25, 9/26 Arrays, StdIn Arrays
StdIn
HowMany
DiscreteDistribution
MysteryArray
Birthday
MaxMin
Students
students.txt data file
1.4.4, 1.4.9, 1.4.10 (Hint: start with Deck.java from lecture), 1.4.13, WebExercises 1.4.1, 1.4.2, Booksite Creative Exercise 1.4.35 (both parts)
1.5.1, 1.5.3, 1.5.11, 1.5.13, 1.5.15, WebExercise 1.5.31
5 9/27, 9/28 StdDraw, NBody StdDraw CheckerBoard
DeluxeBouncingBall
1.5.18, 1.5.21, 1.5.22
6 10/2, 10/3 Functions Functions
StdDraw and Methods
Maxi
Reverse
DiamondTile
2.1.1, 2.1.3, 2.1.4, 2.1.13, 2.1.14
WebExercise 2.1.35
7 10/4, 10/5 More StdDraw, Recursion Recursion
Htree
NestedCircles
Factorial
Htree
NestedCircles
WebExercise 2.1.1, 2.3.3, 2.3.8, 2.3.14, 2.3.22
8 10/9, 10/10 Performance, Review Practice Mini-Exam Repeat
Practice Mini-Exam Answers
4.1.10, 4.1.16, 4.1.27
9 10/11, 10/12 Dynamic Programming Fibonacci Programs
Sequence Alignment
10 10/16, 10/17 Using Data Types Charge client FourChargeClient
Charge
ColorSeparation
Picture API (source)
peppers.jpg
3.1.1, 3.1.6 (Booksite Creative Exer. 3.1.60),
3.1.13 (Booksite 3.1.25),
3.1.14 (Booksite 3.1.30),
Booksite 3.1.14 (answer on p.340)
11 10/18, 10/19 Creating Data Types Ball object and client BouncingBall
Ball
BouncingBalls
3.2.5, 3.2.11 (Point.java code on Booksite)
12 10/23, 10/24 Number Systems
TOY
Number Systems
TOY
TOY cheat sheet
Number Systems Answers
TOY Answers
Booksite 5.1.1, 5.1.16 (~ means complement or flipped bits), 5.1.18
5.3.2, 5.3.6, 5.3.12, 5.4.8, 5.4.9, 5.4.12
13 10/25, 10/26 NO COS126 PRECEPTS
14 11/6, 11/7 More Data Types, Sorting and Searching OOP Example: Vector Vector.java 3.3.6 (answer in book), 3.3.7 (answer in Vector.java in Booksite 3.3), 4.2.4, 4.2.6
15 11/8, 11/9 ADTs, Stacks and Queues, Guitar Hero
Stacks and Queues
4.3.1, 4.3.3, 4.3.4, 4.3.8, 4.3.9, 4.3.16
16 11/13, 11/14 BST, Symbol Tables BST
Symbol Table Example
FrequencyTable.java
ST.java
mobydick.txt
4.4.8, 4.4.9, 4.4.23, 4.4.36 (Booksite Creative Ex 4.4.5)
17 11/15, 11/16 Linked Lists Linked List Code Quote.java 4.3.23, 4.3.25, 4.3.26, 4.3.27, Web Exer. 4.3.1, 4.3.2
18 11/20, 11/21 RE and DFA RE and DFA RE and DFA Answers Fall09 Exam2 #2
Fall08 Exam2 #4
19 11/27, 11/28 Turing Machines,
TSP heuristics
Turing Machine CircularQuote fill-in-the-blank
CircularQuote.java
Fall08 Exam2 #7
20 11/29, 11/30 Universality, Computability,
Intractability
Theory Jigsaw
Theory Quiz
Theory Jigsaw Entries
Theory Quiz Answers
21 12/4, 12/5 Boolean Expressions,
Combinational Circuits,
More TOY
Boolean Algebra Boolean Algebra Answers
22 12/6, 12/7 Architecture,
Sequential Circuits
Circuits Circuits Game
23 12/11, 12/12 Review Practice Mini-Exam Practice Mini-Exam Answers
24 12/13, 12/14 NO COS126 PRECEPTS
Topics, worksheets and exercises below are still tentative for Fall 2012


Copyright © 2011, Robert Sedgewick and Kevin Wayne.