Mr. Gilmore's Course Pages

Welcome to SJP's AP CS A class website!

October 11, 2011: Chapter 2 Summary

Chapter 2 in Java Concepts introduces you to the basics of object-oriented programming. We'll be using the ideas in this chapter for the rest of the year, so it's important to grasp the basics. After your reading, see if your understanding of the material matches the following summary.

Key Concepts in Chapter 2

  • A class is a blueprint for objecs we might want to make. It is stored in a single file. One file, one class.
  • Given a class file, we can make as many objects of that class as we want. Makes sense: give someone a blueprint of a device and he or she can make as many devices as he or she wants from that one blueprint.
  • The Java API contains a vast listing of classes that we can use
  • Object oriented programming involves
    1. Creating a variable to point to an object -- without this, there's no way to handle an object!
    2. Creating an object (usually using the "new" keyword)
    3. Invoking methods on the object (just as we invoked methods on robots -- by telling them to move, etc.

September 23, 2011: Reading and Extra Credit

The first reading assignments in Java Concepts are now posted on the portal. Chapter 1 is an overview of the programming process, computer hardware, and some ethical issues associated with computers. We'll return to these themes througout the year. Get a good grounding now. Chapter 2 will rapidly follow; it will serve as our introduction to the Java programming language. You'll find it stunningly familiar now that you've used JKarel, but there are a few differences.

For those concerned with low grades on an assignment or two, there will be a chance for some extra credit starting with chapter 1 and 2 in Java Concepts. Extra credit will often be available, in various forms, througout the year. All students are eligible for extra credit unless they have cheated on an assignment (plagiarized, etc.). Academic dishonesty of any kind will make a student ineligible for extra credit for the remainder of the year. Each extra credit assignment will carry a point value; at the end of each quarter I simply add earned points into your point total before calculating your average.

September 22, 2011

Now that we're drawing to the close of our first unit -- JKarel the Robot -- it's time to take a step back and consider what the essential lessons are.

  • Problem solving is best done in phases. Programming is not typing, so don't begin on the keyboard. Understand the problem. Break it into parts. Write comments to yourself about how to solve each part. Then code up a part and test to see if your solution works. Continue till you've done all the parts. See the programmer to the right? Is he programming or having a seizure?
  • When coding, write short methods that perform simple, clear tasks and do not cause any side effects. A method longer than a page is a bad, bad idea. Nesting if/else statements more than three deep is a bad, bad idea.
  • Format your code according to the standards we've talked about. As you write, align your curly braces correctly. Begin class names with a capital letter. Begin robot object names with a lowercase letter.
  • Use sensible names for methods. For example, I saw "move5" as the name of a method that had a robot lay down a line of 5 beepers. This is obviously a bad idea since the name implies only moving. "checkIt" is also a terrible name for a method. Check what? Write clear method names, but of course avoiding abominations like anyBeepersInBeeperBag() and instead use something like hasBeepers().
  • Back up your work. Save to the network and backup daily to your flash drive, or save to your flash drive and back up daily to the network. I don't care which. But I do care that you do one. I simply won't accept loss of data as an excuse for lateness of an assignment.

Welcome

This year we'll be learning how to program, from the ground up. I'll assume you know nothing about programming and so we'll start with a relatively simple robot simulation environment in which you will program robots to move around on screen and perform various tasks. Top priorities: learning how to use a text editor to write well-formatted code, learning how to name classes and methods clearly and appropriately, learning how to compile a program and execute it, and learning how to test a program to make sure it does what you think it does.

When October rolls around (soon!) we'll move on to coding in actual Java and begin to talk more about object-oriented programming.

Throughout the course, keep in mind that programming is not typing. It's problem solving, using a very precise logical language. Think about how to solve a problem, break the solution into steps, and then code those steps. But the thought comes before the coding.

September 9, 2011

During the year I'll use this page to keep you up to date on what's transpiring in our AP CS A course. I'll add useful resources and commentary on what's essential to gain from each of the chapters in Java Concepts. Homework assignments will be in the left panel on this site. The right panel will have links to sites and resources to help you learn Java.

Bookmark this page so you can quickly access it during the school year.

Materials You Need for this Class
Material Use
flash drive (usb, 1 GB is plenty) backups of all course files
Java Concepts , 5th Edition by Cay Hortsmann (with Wiley Plus) ISBN 9780470112106Explanations, sample code, website tools
notebook: 3 ring binder, 2" thickness minimum, with 2 dividers Storing notes and handouts

SJP Links

Schedule of Assignments
Date Reading DueAssignments Due

I need additional help with: