My CGI file


Enter Your name:
Software design document

When designing software to solve problem we try to identify a number of components (modules) that each solve part of the problem and taken together, solve the whole problem.

For solving the problem we should consider following tasks:

1. reading and sorting;

2. determining all shifts (words in input lines);

3. sorting the shifts;

4. output of sorted shifts;

These tasts are allocated to different modules which will be then called, in the appropriate order, from a control module.

Module 1.Input:

This module reads input.The input is stored in memory such that the lines are available for further processing by subsequent modules.The input will be stored in a table. Each table entry holds up to ten characters. An otherwise not used character, termed EndOfLine,denotes the end of a line. Second table to indicate the start address of each input line. These tables called Store and StartOfLine, respectively.

Module 2. Shift:

The shift module is called after all input lines have been read and stored. It builds a table called Shifts which contains, for each shift, the index in Store of the first character of that shift, and the index of the corresponding line in StartOfLine.

Module 3. Sorting:

This module employs the tables produced by modules 1 and 2. It produces a new table,Sort. This has same structure as Shifts. The ordering of the entries in Sort is such that the corresponding shifts are in lexicographic order. Thus, Sort is a permutation of Shifts.

Module 4. Output:

The output module uses tables from modules 1 and 3 to produce a neat output of the stored shifts.

Module 5. Control:

The control module does little more than calling the other modules in appropriate order. It may also take care of error messages, memory organization and other bookkeeping duties.

The control and data flow between the modules of this decomposition are depicted the following diagram:



The control flow is indicated by solid arrows,the data flow by dashed arrows.Double arrows denote the input and output of the program.

In CS489 Project, our group will do work of Module 2 which reads data file in Input from Module 1, parse data from the plain text through StartOfLine to EndOfLine. After the storing and sorting will

create a database and transfer it to Module 3.

Tables of output modules would be named by tickers. Fields will be list of stock, price, date/time, volume.


Prepared by Bayaraa (group 9, Module 2)