Program Design
The purpose of today's mini-lab is to practice working through the
design of a complex program, as you develop a design for your first
programming project. You
may work by yourself or with a partner.
Your design should include the following information:
- A drawing (or screen-shot) of the initial world. Each object in
the world should be labeled with its name and its class.
- A list of all world level methods.
- A list of all world level functions.
- A list of world level variables.
- A list of all new classes you will create. For each class you
should list the class level variables, methods and functions that it
will include.
- A list of all events along with the methods that they will call.
For both class and world level methods you should include:
- A list of parameters with their types.
- A clear description of what the method will do. Initially this
can be a brief statement of what this method is intended to
accomplish. As you refine your design, this should start to look
more like a detailed set of Alice instructions.
For both class and world level functions you should include:
- A list of parameters with their types.
- The return type.
- A clear description of what information the function is supposed
to return.
Once you have a design that seems reasonable, take some time to
carefully think about it and discuss the decisions you've made. One
advantage of working out a design before you start coding is that it
is generally easier to revise the design than it is to revise code.
Take this opportunity to try to think of ways to solve the problem
more effectively. If you are completely happy with your design, ask
the instructor or a TA to take a look at it.