Mr. Gilmore's Course Pages

C++ Programming

Welcome to SJP's C++ class website!

January 5, 2010

Now that you've completed your first major group project -- Hangman -- it's time to determine what our final project will be. This program will consume all our time from now to the end of the semester and will probably be done as a whole-class team, though if you wish we can split into two teams. It should be more complicated than Hangman, and require the use of functions, conditional statements, loops, and ideally some kind of data structure such as an array or a struct. Task one is to brainstorm for some ideas and then write down (for submission) two ideas that you think might work. We don't need a complete specification at this point -- only the basic idea for the program. The program might be a game, but it might also be some other kind of user-interactive program. Have the two written ideas for tomorrow. Textbook reading assignments for the next week should be up later today or tomorrow when I return.

September 29, 2009

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.
  • 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 "hitWall" as the name of a method designed to ensure that a robot doesn't hit a wall. This is obviously a bad, bad idea. "checkIt" is also a terrible name. 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 it. I simply won't accept loss of data as an excuse for lateness of an assignment

September 7, 2009

During the year I'll use this page to keep you up to date on what's transpiring in our C++ course. I'll add useful resources and commentary on what's essential to gain from each of the chapters in C++ Primer Plus Stephen Prata. The left panel will contain the current and recent homework assignments. The right panel will link to useful resources that will help you learn C++.

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
C++ Primer Plus Stephen Prata Explanations, sample code, website tools
notebook: 3 ring binder, 2" thickness minimum, with 2 dividers Storing notes and handouts
Schedule of Assignments
Date Reading DueAssignments Due

External Resources