Computer Science 126 |
Worksheets and Code. The worksheets are .pdf files suitable for on-line viewing or printing. The Code link can be copied and pasted into DrJava for convenient completion of the programming exercise. Often the solutions are available on the booksite (if an exercise number is listed).
Recommended Exercises. These are optional exercises we recommend you do at home to build your skills.
Websheets. These are programming exercises you can type and submit in your browser that include basic tests of correctness. They give you instant feedback and have reference solutions.
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 |
---|---|---|---|---|---|---|
1 | 2/4, 2/5 | 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 | 2/6, 2/7 | Data Types (Bring textbook to precept.) |
Data Types Data Types Table |
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 | 2/11, 2/12 | 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 | 2/13, 2/14 | Arrays | Arrays | HowMany Distinct MysteryArray Birthday DiscreteDistribution SecretMessage |
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) |
Distinct Reverse NOrdered NSwap Commonest |
5 | 2/18, 2/19 | StdIn, Parallel Arrays, NBody | StdIn Command-line cheatsheet Command-line tutorial |
MaxMin Students students.txt data file |
1.5.1, 1.5.3, 1.5.11, 1.5.13, 1.5.15, WebExercise 1.5.31 | MaxMin Students Powers Squish Means |
6 | 2/20, 2/21 | StdDraw, Functions | CheckerBoard Functions(Maxi & Reverse) |
Maxi Reverse DeluxeBouncingBall Optional media: TennisBall.png, pipebang.wav |
1.5.18, 1.5.21, 1.5.22 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 | 2/25, 2/26 | Recursion and Fractals | StdDraw and Methods(DiamondTile) Recursion(Factorial) Htree NestedCircles |
DiamondTile 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 | 2/27, 2/28 | Performance and Sorting | Repeat | InsertionTest Repeat |
4.1.10, 4.1.16, 4.1.27 | Lambert |
9 | 3/4, 3/5 | Number Systems and Bitwise Operators |
Number Systems Practice Mini-Exam |
Number Systems Answers | Booksite 5.1.1, 5.1.16 (~ means complement), 5.1.18 | |
10 | 3/6, 3/7 | TOY | TOY + Reference Card | TOY Answers fib.toy toy_1.5.jar (X-TOY) TOY.java Practice Mini-Exam Answers |
5.3.2, 5.3.6, 5.3.12, 5.4.8, 5.4.9, 5.4.12 | |
11 | 3/11, 3/12 | Hamming Codes | – | – | – | |
3/13, 3/14: Precept cancelled. Programming midterm 1 Thurs 3/13 evening. See Exams page. Practice: Fall 2012 (Hats) and Spring 2013 (Food). | ||||||
Have a relaxing spring break! Please fill out the feedback form. | ||||||
12 | 3/25, 3/26 | Using Data Types | Charge, Color, Picture clients | 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 |
13 | 3/27, 3/28 | Creating Data Types | Object-orienting a bouncing ball, Ball 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 |
14 | 4/1, 4/2 | More OOP Stacks and Queues Guitar Hero |
OOP Example: Vector Stacks and Queues |
Vector.java | 3.3.6 (answer in book), 3.3.7 (answer in Vector.java in Booksite 3.3) 4.3.1, 4.3.3, 4.3.4, 4.3.8, 4.3.9, 4.3.16 |
Name Interval Vector QMerge LineEdit |
15 | 4/3, 4/4 | BST Linked Lists |
Binary Search Trees Quote |
Quote Binary Trees solution |
4.3.23, 4.3.25, 4.3.26, 4.3.27 Web Exer. 4.3.1, 4.3.2 4.4.8, 4.4.9 |
MonkeyTraverse MonkeyAddStart MonkeyAddEnd Quote LinkIt |
16 | 4/8, 4/9 | Symbol Tables Generics Markov Model |
Symbol Tables FrequencyTable |
FrequencyTable.java ST.java mobydick.txt |
4.4.23, 4.4.36 (Booksite Creative Ex 4.4.5) | FrequencyTable ReverseLookup |
17 | 4/10, 4/11 | RE and DFA | RE and DFA | RE and DFA Answers Challenge for the bored |
Fall09 Exam2 #2 Fall12 Exam2 #4 |
RegularExercise |
18 | 4/15, 4/16 | Turing Machines, TSP heuristics |
Turing Machines CircularQuote |
Turing machine: java webstart or jar (run java -jar turing.jar TM handout solutions |
Spr13 Exam2 #8 | CircularQuote LinkIt |
19 | 4/17, 4/18 | Theory, Boolean Algebra | Theory Jigsaw | Theory Jigsaw Entries (click table) |
Theory Mini-quiz Theory mini-quiz solutions |
|
20 | 4/22, 4/23 | Circuits | Boolean Algebra/Circuits Practice Mini-Exam |
Boolean Algebra Answers | Circuits Match-up Circuits Match-up Checker |
|
21 | 4/24, 4/25 | Architecture Review |
Architecture Jeopardy! |
Architecture Solutions Practice Mini-Exam Answers |
Spr13 Exam2 #7 Scientific Computing Scientific Computing Answers |
|
4/29–5/2: Precepts cancelled. Programming midterm 2 Thurs 5/1 evening. See Exams page. Practice: Fall 2013 (MiniPro), Spring 2013 (TigerBook), Spring 2010 (BinaryInteger) | ||||||
5/2–5/12: Special schedule for Atomic final project quasi-precepts. | ||||||
Topics and dates below are still tentative for Spring 2014 |
Copyright Robert Sedgewick and
Kevin Wayne.