Specification Guidelines

Your specs should document all your design decisions, as well as all the interesting points about your class structure and algorithms. Given a good specification, you (or anyone with commensurate programming experience) should be able to implement your entire program without running into any unforeseen design decisions.

However, after you submit your specs, you will inevitably run into unforeseen issues, or you will alter your algorithm. If this happens, you need to update your specifications to reflect the current implementation and design strategy. It would also be useful to note why such changes were needed. Be sure to submit updated specifications at each deadline.

If your spec differs from your code, both are wrong.

Specification Outline for Project 2

High Level Specifications

Overview

Notes: This need not be technically specific. This is something users should be able to read and consequently understand what the application does as well as why they would want to use it.

Program Use & Normal Behavior

Example

Modules

Notes: A module or component is some unit of program operation. For this project, initializing the game world with the world description file and parsing the input stream from the user's typed commands are two such modules (there are definitely more). For each module, you should describe operationally how it fits into the whole application, give a general overview of what the module needs to do and broadly detail how modules will interact.

General Flow

World Description File Input/Parsing

Game Initialization

Interaction with the User

Notes: You may feel like you are repeating parts of the project description here and in other places in your specification. This is okay. A project specification is a technical document that should be able to stand alone containing all the relevant information about your project.

Low Level Specifications

Data Structures and Algorithms

Notes: Be specific here. Feel free to refer to actual classes and interfaces as well as their methods. Pseudo-code may even be appropriate. The content in this section rests heavily on design choices, so the above questions should only be taken as a starting point. This is one of the most important parts of the spec for this project. Describe any abstraction you choose to implement and justify why this will allow you to add additional program features later.

Analysis

Notes: Both analyses need not be rigorous, but should give an idea of how your program scales and which components, if any, are the bottlenecks.

Testing

Timetable


Stylistic Notes

  1. The specification is NOT a readme file. It is a technical document which should have correct grammar and spelling.
  2. Examples are useful. It is often better to show with an example rather than to tell textually. Reusing one or two examples throughout the spec may make it easier for a reader to follow.
  3. Being vague and wordy is not beneficial. Try to get your point across directly and briefly.

General Notes


Examples

Program Use & Normal Behavior

  1. The program will have a command line-based user interface. The user will need to say:

    $ java Adventure inputfile

    where the inputfile is a world description file for a particular configuration of a game world.
  2. No output files will be generated. Program output will be sent to System.out.

Merits: Explicitly shows command line interface.

Faults: Should be more specific as to what a world description file is and what types of such files are supported. This may be discussed in more detail in another section of the specification, but that section should be referenced here. Depending on the context of this section, the numbering scheme may not be appropriate.

Return to spec


up to main page