Computer Science 126
General Computer Science
Fall 2013


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. Websheets are exercises you can type and submit in your browser that include basic tests of correctness.

Visualizer. When tracing Java code, this visualizer tool can help you see exactly what Java does in each step of the process.

Click here for the reading period schedule.

# DATE TOPICS WORKSHEETS CODE FOR EXERCISES RECOMMENDED EXERCISES WEBSHEETS
NO COS126 PRECEPTS on 9/11
1 9/12, 9/13 Intro, HelloWorld,
Command-line Arguments
First Programs
Assignment Guidelines
Treasure Hunt
HelloWorld
NameAge
NextYear
NameAge Solution
NextYear Solution
1.1.1–4
1.2.7
HelloWorld
NameAge
NextYear
SquareOf
SquareSwap
2 9/17, 9/18 Data Types
(Bring textbook to precept.)
Data Types
Data Types Table
Data Types Table Solution
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
Eggsactly
PercentScore
PizzaCalculator
WindChill
Distance
ThreeSort
3 9/19, 9/20 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
Flag
AgeChecker
SquareCensus
Quadratic
ModularSqrt
4 9/24, 9/25 Arrays, StdIn Arrays
StdIn
Command-line cheatsheet
Command-line tutorial
HowMany
Distinct
MysteryArray
Birthday
MaxMin
Students
students.txt data file
DiscreteDistribution
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
Distinct
Reverse
NOrdered
NSwap
Commonest
5 9/26, 9/27 StdDraw, NBody StdDraw CheckerBoard
DeluxeBouncingBall
Optional media:
TennisBall.png,
pipebang.wav
1.5.18, 1.5.21, 1.5.22 MaxMin
Students
Powers
Squish
Means
6 10/1, 10/2 Functions Functions
StdDraw and Methods
Perimeter
Maxi
Reverse
DiamondTile
Perimeter
2.1.1, 2.1.3, 2.1.4, 2.1.13, 2.1.14
WebExercise 2.1.35
Positive
Find
Boxed
Summer
Yarra
7 10/3, 10/4 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 Kettles
Factorial
TextFractal
BinarySum
Evaluate
ZeroSum
8 10/8, 10/9 Performance, Review Repeat
Practice Mini-Exam
Repeat
Practice Mini-Exam Answers
4.1.10, 4.1.16, 4.1.27
9 10/10, 10/11 Dynamic Programming Fibonacci Programs
Sequence Alignment
Catalan
PartitionCount
Mario
Knapsack
KnapsackBacktrack
10 10/15, 10/16 Using Data Types Charge client PlayTime
FourChargeClient Charge
ColorSeparation peppers.jpg
Picture API (Picture.java)
Color API
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)
FourChargeClient
IsPalindrome
ComplementaryDNA
CircularShift
GeneFind
11 10/17, 10/18 Creating Data Types Ball object and client Stopwatch.java
Person.java
Ball, BouncingBalls
BouncingBall (§1.5)
3.2.5, 3.2.11 (Point.java code on Booksite) Recorder
Clicker
CountingSort
CombinationLock
Monomial
12 10/22, 10/23 Number Systems
and Bitwise Operators
Number Systems Number Systems Answers Booksite 5.1.1, 5.1.16 (~ means complement), 5.1.18
13 10/24, 10/25 No precept. Programming
Midterm 1 in the evening.
Practice programming exams
HatsPart1
HatsPart2
FoodPart1
FoodPart2
14 11/5, 11/6 More Data Types, Searching, Guitar Hero OOP Example: Vector Vector.java 3.3.6 (answer in book),
3.3.7 (answer in Vector.java in Booksite 3.3)
Name
Interval
Vector
Lambert
15 11/7, 11/8 ADTs, Stacks and Queues, Sorting Stacks and Queues 4.2.4, 4.2.6, 4.3.1, 4.3.3, 4.3.4, 4.3.8, 4.3.9, 4.3.16 QMerge
LineEdit
16 11/12, 11/13 Symbol Tables, Generics, Markov Symbol Tables
FrequencyTable
ST.java
mobydick.txt
4.4.8, 4.4.9, 4.4.23, 4.4.36 (Booksite Creative Ex 4.4.5) FrequencyTable
ReverseLookup
17 11/14, 11/15 Linked Structures (Lists and Trees) Binary Search Trees
Quote
Binary Trees solution 4.3.23, 4.3.25, 4.3.26, 4.3.27, Web Exer. 4.3.1, 4.3.2
MonkeyTraverse
MonkeyAddStart
MonkeyAddEnd
Quote
LinkIt
18 11/19, 11/20 RE and DFA RE and DFA RE and DFA Answers
Challenge for the bored
Fall09 Exam2 #2
Fall12 Exam2 #4
RegularExercise
19 11/21, 11/22 Turing Machines,
TSP heuristics
Turing Machines
CircularQuote
Turing Machines answers Spr13 Exam2 #8 CircularQuote
NO COS126 PRECEPTS on 11/26. Happy Thanksgiving!
20 12/3, 12/4 Theory, Boolean Algebra/Circuits Theory Jigsaw
Boolean Algebra/Circuits
Theory Jigsaw Entries (click table)
Boolean Algebra Answers
Practice your Theory (solutions)
21 12/5, 12/6 Circuits/Architecture, TOY Circuits Match-up
TOY + Reference Card
Circuits Match-up Checker
TOY Answers
5.3.2, 5.3.6, 5.3.12, 5.4.8, 5.4.9, 5.4.12
Practices for programming midterm 2: Spring 2013 (Person, TigerBook) Spring 2010 (BinaryInteger)
Topics, worksheets and exercises below are still tentative for Fall 2013
22 12/10, 12/11 Review Jeopardy!
Practice Mini-Exam
Jeopardy! (click "Review Mode")
Practice Mini-Exam Answers

23 12/12, 12/13 No precept.
Written Midterm 2 Thursday morning.
Final project due in January.


Copyright Robert Sedgewick and Kevin Wayne.