CS 124, Fall 2009
Lab 10: Designing Classes

For lab this week, you will be doing something different. Instead of programming, you will spend the time designing classes. You should team up with one or two other people in the class to work on this lab. Your class designs, along with accompanying essays as described below, are due at the beginning of lab next Thursday.

This page also contains information on the final project.

Remember that you should be working on Project 3 (Minesweeper), from the previous lab. You can do some work on that project during today's lab, if you feel that you have adequately completed the lab. The Minesweeper project will be due on Tuesday, November 17.

Exercise: Designing Classes

For today's lab exercise, you should work with one or two other people in the class to design a set of related classes that could be used in an implementation of one of the following:

If you would prefer to work on some other area, ask for permission.

You are not being asked to write the classes, just to design them. For each class, you should give the name of the class, a list of variables that represent the state of an object belonging to that class, and a list of methods that represent the behavior of such objects. For a method, don't forget to specify the parameters and return type. You should include a short comment for each variable and method, describing its purpose.

In addition to your class designs, you should turn in a short essay (a paragraph or two) for each class that discusses the design. You should explain why you made the design choices that you made.

There is a danger in this exercise that you will work on it for fifteen or twenty minutes and think that you are done. You aren't. Serious design work implies discussion and decisions about what entities need to be represented as classes and what their properties and behaviors should be. You will be graded on the completeness and appropriateness of your responses.


The Final Project

The final programming project will count for 10% of the total grade for this course. For this project, you have to decide what program you want to work on, in consultation with me. Your choice of project must be made before Thanksgiving. A written proposal describing the project is due on Monday, November 23. You should set up a meeting with me before then to discuss your plans.

The project itself is due on the last day of classes, Friday, December 11. On that day, we will have class presentations of the projects. If your project is substantially finished on the 11th, you will have a chance to polish it up and turn in a final version at the final exam on December 15.

For this final project, you can choose to work with a partner. If you do this, your project must be somewhat more ambitious than a one-person project.

Remember that you should not give help to, or receive help from, any other member of the class (except for your partner, if you have one). You can get help from me or from the computer science TA's, but not from anyone else. You should not copy code from the Internet or from any other source, unless you get my explicit permission to use it in your project.

Although you will probably want to write a GUI program, a command-line program is also acceptable. You should try to design a program that will be useful, interesting, or fun. Write a program that you would like to use yourself. The point is not so much to write a big, complex program as to write a program that is well-designed and runs well. Here are some ideas for projects, but you are not restricted to choosing from this list: