Home AP Computer Science Computer Science Principles FOOP Functional and Object-Oriented Programming Programming for Mobile Devices
Current Schedule Favorites Class(room) Policy Blog Gunn Girls Tech Club Send Me Email

AP Computer Science


2015 AP CS Free Response test (released)

REMINDER: You must buy a copy of Be Prepared for the AP Computer Science Exam. We will be using it on the very first day back from Spring Break.

I WANT LAMBDA-THINGWEAR! WANT WANT WANT!

Brian Harvey explains abstraction

If you are looking to do a Java refresher, it's hard to argue with Advent of Code

BONUS VALUE PAK AP COMPUTER SCIENCE REVIEW THING

CodingBat problems (main web page) Topics list for AP CS


Java 8 API documentation


xkcd explains functional programming (make sure to put the mouse over the cartoon)

40 Key Computer Science Concepts Explained In Layman’s Terms

AP COMPUTER SCIENCE SUMMER HOMEWORK (Mandatory only if you have not taken Intro to Java)

Installation instructions for DrRacket


Stuff you must use in class

AP CS resources

USACO resources

Miscellaneous Goodies

WEEK TOPIC(S) READING
HOMEWORK
8/15--8/19

Stuff That Amuses Me

Java Review

None, Download and install DrRacket, Install Java and Eclipse

Download and install DrRacket, Install Java and Eclipse;

Roshambo tournament

The flag problem

8/22--8/26 Intro to Scheme SICP: Chapter 1.1

Do the weekly quiz on Schoology. The quiz dates and Schoology due dates are identical. Quizzes are intended to happen at the start of class on the first day of the week. They are open book and ungraded. It is important to do well on them as you will need to know the stuff contained in quizzes in practice and on tests.

You will have a quiz every week, so do that first thing every week.

A solution to the flag problem

Problems 1.1 through 1.6 (in problem 1.2, the two smudged numbers are 4 and 4/5).

8/29--9/2 Procedures and Processes SICP: Chapter 1.2
1.8 (expression is ((x / y2) + 2y) / 3, 1.9, 1.10, 1.14 (do 1.14 by hand on paper, show it to me, and move on), 1.16; Extra credit: fill in the needed code in 1.19 and give a written explanation of how you solved the problem;

Some thoughts on recursive versus iterative processes.

Two to the millionth power. Because I felt like it.

9/6--9/9 Formulating Abstractions with Higher-Order Procedures SICP: Chapter 1.3 (the Golden Ratio and Newton's Method sections can be skipped, although that's good stuff if you have the time and inclination)

Checkup #1

1.30, 1.31 part (a) only, 1.32 (iterative process only), 1.33 (use odd numbers instead of prime numbers for part (a)); here is a working version of a GCD function you can cut and paste

Lecture notes on accumulate that may be helpful for problem 1.32

9/12--9/16

Lists (Simply Scheme: Chapter 17)

Formulating Abstractions with Higher-Order Procedures

Do Simply Scheme: Chapter 17 then finish SICP: Chapter 1.3

Notes on the list abstraction

Simply Scheme: 17.1, 17.2, 17.3, 17.8--17.12, 17.14

1.34, 1.37a, 1.38, 1.41, 1.42, 1.43

Checkup #2

Practice test (from 2012)

Practice test (from 2012) solutions

Review content for first test: solutions to the pi and repeated problems

9/19--9/23 Data Abstraction SICP: Chapter 2 intro, SICP: Chapter 2.1

Brian Harvey explains abstraction

Practice test (from 2012)

Practice test (from 2012) solutions

Jeopardy review game

SICP: Chapter 1 Test on third day of class this week

9/26--9/30 Data Abstraction SICP: Chapter 2 intro, SICP: Chapter 2.1

2.1, 2.2, 2.4, 2.7, 2.8, 2.9; (2.6 is interesting stuff, but not something you have to turn in.)

10/3--10/6 Data Abstraction SICP: Chapter 2 intro, SICP: Chapter 2.1

2.1, 2.2, 2.4, 2.7, 2.8, 2.9; (2.6 is interesting stuff, but not something you have to turn in.)

10/10--10/14 Data Abstraction SICP: 2.2.1, 2.2.2

2.17, 2.18, 2.20, 2.21, 2.22, 2.23, 2.24, 2.25, 2.26, 2.27; Extra credit: 2.19

Old SCVAL Door Prize Problem

10/17--10/21 Data Abstraction SICP: Chapter 2.2.3 (skip all stuff after problem 2.35)

2.29, 2.30, 2.31, 2.32, 2.33, 2.35

Mobile example for testing

Checkup #3

10/24--10/28 Data Abstraction

Lecture

NCWIT Aspirations Award application

Binary Search Tree Problems

2.29, 2.30, 2.31, 2.32, 2.33, 2.35

2012 chapter 2 test

2012 chapter 2 test solutions

Review topics for chapter 2

Solutions to 2.29, 2.32, 2.33, 2.35

Solutions to the binary search tree problems

One more box-and-pointer diagram practice problem

list->tree problem

list->tree problem solution

10/31--11/4 Assignment and Local State

SICP: Chapter 3.1

SICP: Chapter 2 and Binary Search Trees Test on first day of class this week

3.1, 3.2, 3.3, 3.7, 3.8

The Cows and Body Snatchers example (related to problem 3.7 on joint accounts)

11/7--11/10 The Environment Model of Evaluation
SICP: 3.2;
Parking meter examples

Boring Problems: 3.9, 3.10, 3.11 (Do these on paper. Not mini white board--there won't be enough space. Use paper and use pencil unless you find re-doing diagrams to be a joyful process.)

Parking meter examples

Problem 3.7 (joint account) solution

Rules for drawing environment diagrams (Redo for Python)

11/14--11/18 The Environment Model of Evaluation
SICP: 3.2

Boring Problems: 3.9, 3.10, 3.11 (Do these on paper. Not mini white board--there won't be enough space. Use paper and use pencil unless you find re-doing diagrams to be a joyful process.)

Rules for drawing environment diagrams

11/21--11/22 The Environment Model of Evaluation

SICP: Chapter 3.3; an environment diagram practice problem

Download Eclipse at home if you have yet to do so.

3.15, 3.17, 3.22, the delete! problem for tables, 3.25, 3.27

count-pairs (problem 3.17) starter kit

Rules for drawing environment diagrams

A discussion of the environment model as pertains to problem 3.7, make-joint

A very detailed explanation of environment diagrams (h/t Shilpa Yarlagadda)

11/28--12/2 Modeling with Mutable Data

SICP: Chapter 3.3

Download Eclipse at home if you have yet to do so.

3.15, 3.17, 3.22, the delete! problem for tables, 3.25, 3.27

The delete! problem for tables (higher priority than 3.25 and 3.27)

count-pairs (problem 3.17) starter kit

3.22 message passing queue starter kit

12/5--12/9 Modeling with Mutable Data

SICP: Chapter 3.3; an environment diagram practice problem

Download Eclipse at home if you have yet to do so.

3.15, 3.17, 3.22, the delete! problem for tables, 3.25, 3.27

The delete! problem for tables (higher priority than 3.25 and 3.27)

Review content for chapter 3 test

2012/2013 actual chapter 3 test

2012/2013 actual chapter 3 test solutions

SICP: Chapter 3 Test on second day of class this week

Solution to count-pairs problem

Solution to the queue problem (3.22)

Solution to the table deletion problem

Finish any outstanding homework and wrap up any extra credit projects. (Remember, if there are any lingering huge gaps in your homework, those must be addressed before you can rack up extra credit.)

EXTRA CREDIT IS DUE ON SUNDAY, 12/11. NO EXCEPTIONS.

12/12--12/16

FINALS (12/16--12/18)

You will be tested on the SICP stuff. To keep it less stressful, it will all be in Scheme.

Jeopardy Review

EXTRA CREDIT IS DUE ON SUNDAY, 12/11. NO EXCEPTIONS.

Jeopardy Review for final

Final: SICP (All)

B Period: Wednesday, 12/14, 8:30am
C Period: Thursday, 12/15, 10:30am
D Period: Wednesday, 12/14, 10:30am
E Period: Friday, 12/16, 8:30a\\xzm

12/19--12/23

WINTER BREAK

INTRODUCTION TO SLEEP

Chillax

12/26--12/30

WINTER BREAK, PART DEUX

ADVANCED SLEEP

Loaf about and chow down

1/3--1/6

Interfaces and Polymorphism

Inheritance

Toys

Chapters 11 and 13

The topics list for the Intro Java final works well for AP CS, too.

Intro to the Comparable interface

Do the mobile problem (2.29) in Java. Before you start, think carefully about how many classes and interfaces you should write to do this. Here is what a solution looks like in Scheme.

Solve the festive HashMap problem.

Reread pp. 265--267 on loop invariants; then solve Problem 1.16 except with a loop in Java as opposed to the iterative recursion function you wrote in Scheme back in August.

1/9--1/13 Interfaces and Polymorphism

Chapters 11 and 13

Solution to the mobile problem in Java

Finish the festive HashMap problem.

Regarding HashMaps (note the parts about load factor and capacity)

Intro to GridWorld/Install GridWorld

GridWorld ZIP file
GridWorld installation instructions

The TriangleBug and KnightCritter problems

R13.8, R13.9, PP 13.1 (optional; it's a nice project; you have to construct your own Maze class and then figure out how to solve it; could be done with Rocks in GridWorld)

Toys

1/17--1/20 Interfaces and Polymorphism Chapters 11 and 13

The TriangleBug and KnightCritter problems

Solution to the KnightCritter problem

NOTE: There is class on Thursday and Friday of this week and Paley will be back in the classroom for that. There are no hybrid release days this week. Sorry about the confusion!

1/23--1/27

Binary Search Trees

 

Intro to the Comparable interface Cow problem

Randp project (Do this before the Binary Search Tree project)

Binary Search Tree project

Binary Search Tree starter kit

1/30--2/3

Binary Search Trees

 

 

Intro to the Comparable interface Cow problem

Solution to the Comparable interface Cow problem

Intro to the Comparable interface with some polymorphism

Solution to the Randp problem;

Solution to BST

The iPhone inheritance/delegation example from class

2014 Second Semester Midterm 1

2014 Second Semester Midterm 1 Solution

2/6--2/10

Binary Search Trees

 

Finish working on the binary search tree project. If you have, then work on any incomplete projects or chess.

Given that this is the week of the musical, a lot of you are going to be vegetables, but very nice vegetables who could use a break. So, I expect you to try hard during class, but the test will be pushed back to Monday, 2/13 and Tuesday, 2/14.

Topics list for MT1

Histogram/HashMap problem solution

2/13--2/15

Sorting and Searching

Chapter 19

Topics list for MT1

2nd Semester Midterm 1 on interfaces, inheritance, and binary search trees: FIRST DAY OF CLASS THIS WEEK

Heap, Quick, Merge, Bubble, Insertion, and Selection code

Write selectionsort, insertionsort, and bubblesort. Here is Tony Wang's JavaSort program to help you visualize what your code should do.

Apple vs. the FBI (general story)

Apple vs. the FBI (Apple's story)

2/21--2/24 Quicksort Chapter 19 (continued)
Heap, Quick, Merge, Bubble, Insertion, and Selection code

Find the median in average O(n) time of an array of ints by modifying quicksort

2/27--3/3 Heapsort, Mergesort  

Another government case against Apple

Solution to the median problem

A nice animation demonstrating heapsort.

Write heapsort. Note that the assignment says to sort an array of Comparables.

NOTE: D and E periods have a release day on Tuesday. B and C periods have a release day on Wednesday.

3/6--3/10 Data Structures Chapter 20

Write heapsort. Note that the assignment says to sort an array of Comparables.

A nice animation demonstrating heapsort.

An explanation of why building a heap is O(n). The explanation starts at about 37 minutes into the video in case you want to skip forward. The rest of the lecture is pretty good, so the tenacious student may want to watch the whole thing. Understanding the lecture depends on understanding mathematical series as well as a heapify method (heapify is what is called buildHeap in our solution). It's as clean an explanation as I have been able to find on the Internet.

Review materials for Midterm 2

Homework R20.3, R20.4, R20.5, PE20.2, PE20.13, PE20.14

3/13--3/17 Advanced Data Structures

Chapter 21

Read "Choosing a Container" on pages 813--814 carefully

Write mergesort in Java. Here is the Scheme version.

Review materials for Midterm 2

2012 sorting test

2012 sorting test solution

Study this, it will make all the difference (h/t Drew Briggs)

The Awesome Car Parking Problem

Find the duplicate problem

The Quadrant problem

3/20--3/24 GridWorld Revisited

N/A

Stuff I would study to prepare for the sorting test

MOAR PRACTICE!

MOAR PRACTICE solutions

Mergesort problem to prepare for test

2nd Semester Midterm 2 on SECOND day of class this week on searching, sorting and orders of growth

LifeBug problem

LifeBug solution

Optional: CircularQueue problem

3/27--3/31 Data structures

Chapter 19 (revisited)

Chapter 21 (revisited)

The Josephus problems are great review problems for practice with ArrayLists, Strings, and logarithms. Remember change of base to perform log2 arithmetic: log2N = Math.log(N)/Math.log(2). Look up the Math class in the Java 7 API if you want details.

The problems from the book are mainly review at this point, but good to look over.

R19.3, R19.4, R19.6, R19.7, R19.9, R19.13, R20.3, R20.4, R20.5, R20.5, PE20.2, PE20.13, PE20.14

Homework R21.1, R21.4 (write a class MathSet that implements the Set interface, write union and intersection methods for it, and also add the methods specified in P21.9), R21.6, R21.7, R21., R21.13, R21.14, R21.15, R21.17, P21.4, P21.17

Act anxious in anticipation of Spring Break

4/3--4/7 SPRING BREAK IMPORTANT MUSIC RESEARCH

THEY MIGHT BE GIANTS

4/10--4/14

Exceptions

Review

Chatpter 15

All sorts of stuff

BRING YOUR STUDY GUIDE TO CLASS EACH DAY ONCE WE RETURN FROM SPRING BREAK

Hellacious month of test prep boredom begins

Keyword sheets 1, 2, 3

A fun logic problem

Exceptions examples from class

PE 15.1; if you want to learn about streaming data from a web site, consider doing PP 15.1

Exceptions examples from class (you will need to toggle comments to use

More practice tests

An example and routine abstract class problem; Practice tests;

A bunch of AP test review problems

Solutions to some review problems

Keyword sheets 1, 2, 3

4/17--4/21 Review All sorts of stuff

Brain Hacking (60 Minutes)

Even more practice tests

The gross Superclass and Subclass problem

The gross Superclass and Subclass problem solution explained

4/24--4/28 Review All sorts of stuff

Brandon Horn's explanations of 2009 free response answers

Even more practice tests

5/1--5/5

AP Computer Science Test, Tuesday, May 2

Introduction to Processing

AP Computer Science Test, Tuesday, May 2

Johannes Haushoffer resume of failures

 

NOTE: The take-home final does not override other semester two test scores. As discussed in class, extra credit projects are really the way to overcome test scores, and you can earn up to 16 of them with Nifty assignments. Max four extra credit projects will be accepted: CS2 project = 4 points, CS1 project = 2 points, CS0 projects = 0 points, and if more than one is listed for a project, the lesser counts. (Something indicated as CS1 or CS2 is treated as CS1 and worth 2 points, e.g.)

ArrayList practice

CodingBat for String and array practice

Do well so you can get college credit! Unless you go to MIT or one of the other colleges which doesn't accept AP scores. There are lots of them, alas. See: http://www.collegeboard.com/ap/creditpolicy/

Post-AP test pizza feed ($5/slice, but it will be awesome pizza)

Resolved: "The government should have lawful access to any encrypted message or device."

Introduction to Processing (we will be meeting a second time this week so we can prepare for Midterm 3)

5/8--5/12 Take Home Test/Chess

2nd Semester Midterm 3 will be handed out on Monday, May 8, due Friday, May 19

For the Take Home Test, just submit a ZIP file containing your project in Schoology

Chess (or another project that I sign off on) can be done for extra credit

5/15--5/19 Projects time

Finish your projects

Hand in take home test

5/22--5/26 Projects due

Finish your projects

 

5/29--6/1 Finals Week Sita Sings the Blues Summer!

Readings are due each Monday.  Homeworks and projects are due AT THE BEGINNING OF CLASS on the following Monday unless it is a holiday. In that case they are due the first class period following the Monday.

Example: The reading of  Abelson and Sussman chapter 1.1 and download of DrRacket is due on 8/28. Problems 1.1 through 1.6 in Abelson and Sussman are due on Monday 8/31.

Unexcused late homework, projects, quizzes, and tests will be given a score of zero.  If you expect to have problems meeting a deadline, I need to know about it in advance.  Excuses after the fact will be given zero tolerance, barring a medical excuse signed by parents.