A brief narrative description of the functonality encapsulated by the module.
At this level there should be no implementation details whatosever.
This module implements the functionality of a first in first out queue. No error handling is provided.
List the operations to be implemented by the module. For each operation the inputs and outputs should be specified as well as appropriate invariants of the operation. The necessary preconditions for success of each operation should be specified as well as its effect.
Enque(Item): Adds Item to the FIFO queue. The queue must exist and the item must have a value. The value of Item is an integer between -75 and +213. The operation fails if the queue is full. If the queue is initially empty then the head of the queue after the operation is Item, else the head of the queue is unchanged. Items already on the queue remain on the queue and are unchanged both in order and value. Item becomes the new rear of the queue.
Exceptions are conditions that cause the operations to fail. A full specification should cover all those exceptions that can be predicted.
If a segment violation occurs during a queue operation the operation is to fail and leave the queue unaltered.
You should make your specifications as precise as possible within the constraint that you are not using a formal specification language. Bear in mind that the specification describes what you want the module to do: no less and no more. You should not assume that the implmentor will ``know'' what you mean, if you leave something out, she will too, and she will be right.
To return to the software engineering home page click HERE