Home » Archive

Articles in the 2009 AP CS A Category

2009 AP CS A »

[9 Jun 2010 | One Comment | ]

The Five Tenets of Programming
1. If you feel like you’re falling behind, ask for help, if not from Ms. Martin, then from other students.  You’ll save yourself hours of frustration.
2. Don’t be afraid to try your own thing if you get the chance, even if you think it’s beyond your level.  You’ll learn faster if you’re interested in the project.
3. Temp variables are awesome.  So are ArrayLists.
4. Don’t let the sometimes snooty programming club people argue with you — by the end of …

2009 AP CS A, 2010 Spring Exploring CS, Programming Club »

[25 May 2010 | No Comment | ]

We were lucky to have Ben Slivka join us in Exploring Computer Science and AP Computer Science.  Mr. Slivka is a computer scientist who worked at Microsoft from 1985 to 1999 and was involved in several exciting projects there, including starting Internet Explorer.  Since, he has worked at Amazon, started and recently sold Dreambox Learning, and has worked with several non-profits.
Mr. Slivka shared his ideas on the current state of computing technology as well as some of what is to come.  I took some notes as students asked questions and …

2009 AP CS A »

[16 May 2010 | No Comment | ]

You will spend the remaining month of AP Computer Science creating a project of your own design.  I realize that there’s a lot of pressure involved in coming up with a good project idea so I’m providing starting points below.  I’ve organized the ideas by category.  Note that the research-only (no coding) options can get you up to a 90% (if you do a stellar job) — after all, this is a programming class and I want to encourage you to choose an option that will result in a software …

2009 AP CS A »

[13 May 2010 | No Comment | ]

You will need to download this zip file and extract its contents to a convenient folder.  We will be working with Processing.js, which uses a language very similar to Java that later gets converted to JavaScript.  The advantages here are that you’ll be working with a familiar language and be able to create browser-ready projects.  Today I just want you playing around with a provided example (gogo.html in the zip file) and hopefully looking at the API.  Processing.js is an extremely powerful framework — check out a Tower Defense game …

2009 AP CS A »

[10 May 2010 | One Comment | ]

Find out what your IP address is.  Note that any service with access to your IP address also knows where you are.
Use a ping tool to find out how long it takes to get to a particular server.  Try google, garfieldcs.com?  Note that this tool sends the ping from the network-tools.com server, NOT from your machine.  Compare with a ping from the command line.
Use a visual traceroute tool to find out the physical path information takes to get to you from a particular website.  Interesting searches might include bbc.co.uk gicp.org.gh …

2009 AP CS A »

[5 Apr 2010 | No Comment | ]

Adapted from Cay Horstmann — thanks!
Critters are included in GridWorld to emphasize design. The act method calls five methods, and subclasses override some or all of them to achieve some desired behavior. (For those of you interested in digging deeper into programming and software engineering, the act method is an example of the “template method” design pattern. Design patterns are a powerful way of expressing common best-practices about code structure. Google it!)

When to use Critter
Not every actor can or should be represented as a
Critter. In the …

2009 AP CS A »

[5 Apr 2010 | No Comment | ]

Thanks to Robert Glen Martin for the project idea and writeup. Any errors are my own!
You will need to turn in whatever you have by 11:30pm on Monday April 11th. No late work will be accepted — not turning anything in will result in a 0.
Introduction
This assignment is designed to get you thinking about the design of larger systems, to get a small introduction to artificial intelligence and to deepen your familiarity with GridWorld. Hopefully you’ll find it pretty cool — by the end, your ants should be …

2009 AP CS A »

[21 Mar 2010 | One Comment | ]

Concept
Definition

Abstract method
A method that is declared (as in an interface) but not implemented. Abstract methods represent the behavior that a class promises to implement when it implements an interface.

Accessor
Instance method that provides information about the state of an object without modifying it.

Behavior
A set of actions an object can perform, often reporting or modifying its internal state.

Client code
Code that interacts with a class or objects of that class.

Code Reuse
Practice of writing program code once and sing it in many contexts (inheritance, parameterization are examples of code reuse techniques).

Encapsulation
Hiding implementation details …

2009 AP CS A »

[21 Mar 2010 | No Comment | ]

You will complete the Jumper class as detailed in the GridWorld case study part 3 document.  I’ve rewritten some of the instructions here — follow these!!
Requirements
You will create a class called Jumper. This actor can move forward two cells in each move. It “jumps” over rocks and flowers. It does not leave anything behind it when it jumps.
Before you get going, you need to figure out how you will address the following situations:

What will a jumper do if the location in front of it is empty, but the location two cells …

2009 AP CS A »

[15 Mar 2010 | One Comment | ]

Nice work on the classes, arrays and ArrayList quiz!  I loved reading the extra credit, as usual!
The rockin’ coder loves Java
His codes are hotter than lava
He writes code faster than the speed of light
When it compiles the whole world is in flight
The gangsta coder makes his way
Writing lines of code to save the day.
He compiles often and knows to debug;
this rockin’ coder’s a computer thug!
I’m from 8 mile
Where only the hardest compile
We always do it in style
Because we ain’t had cast for a while
Don’t hit me on the nextel chirp
I …