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.

# 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
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
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
Topics, worksheets and exercises below are still tentative for Fall 2013
8 10/8, 10/9 Performance, Review 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

10 10/15, 10/16 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/17, 10/18 Creating Data Types Ball object and client BouncingBall
Ball
BouncingBalls
3.2.5, 3.2.11 (Point.java code on Booksite)
12 10/22, 10/23 Number Systems
and Bitwise Operators
Number Systems Number Systems 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/24, 10/25 TBA
14 11/5, 11/6 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/7, 11/8 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/12, 11/13 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/14, 11/15 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/19, 11/20 RE and DFA RE and DFA RE and DFA Answers Fall09 Exam2 #2
Fall08 Exam2 #4

19 11/21, 11/22 Turing Machines,
TSP heuristics
Turing Machine CircularQuote fill-in-the-blank
CircularQuote.java
Fall08 Exam2 #7
NO COS126 PRECEPTS on 11/26
20 12/3, 12/4 Theory, Boolean Algebra, Circuits Theory Jigsaw
Theory Quiz
Boolean Algebra
Theory Jigsaw Entries
Theory Quiz Answers
Boolean Algebra Answers

21 12/5, 12/6 Circuits, TOY Circuits
TOY
TOY cheat sheet
Circuits Game
TOY Answers

22 12/10, 12/11 Review Practice Mini-Exam Practice Mini-Exam Answers
23 12/12, 12/13 TBA


Copyright Robert Sedgewick and Kevin Wayne.