Program Design
Microcomputer/DOS Tutorial


Computer Studying

Navigation
{NavForms}

Virus Tutorial Map
Tutorial Map

If you follow the traditional five-step approach to problem solving found outlined a few pages ago you should have a very logical series of steps that define your problem solution.

Top down design would have you state high level program instructions, then break these down into smaller sets of instructions, and again into smaller sets until you get to what are termed modules, the lowest level that you need to program.

Characteristics that make up a module are described here.

  • Program Modules
    • Each module is independent of other modules.
    • Each module has one input and one output.
    • A module is small in size.
    • Programming a single function per module is a goal.

Each module will be different, depending on the specific problem being solved. Very simple problems may have a single module, complex problems many hundreds. The key is readability. Anyone should be able to pick up your program and figure out the basics of what you are doing with little effort. A side benefit of top down design is ease of debugging problems and ease of making changes to the solution.

Program Structure

A structured program will be organized in a manner like that described below. LISP and other newer languages have somewhat different structures.

Program PgmName;
Definition of program variables

First you tell the compiler what names you will be using to stand for various things in your program.
Subprogram
Modules
Next, you define different modules that will be used in solving your problem. These are called procedures or functions depending on their structure.
begin
Main program code Finally, you state the logical steps that combine variables and modules to solve the particular problem. This part of the program is often the shortest in terms of actual code as it mainly calls various subprogram modules that do the actual work.
end.

 

Keep Reading Programming Example


{NavBar}
Home | Products | Definitions | Newsletter | Virus Tutorial | Contact


FILExt is proudly hosted by DewaHost.com - a fast and reliable host for everyone!
DewaHost offers premium Web hosting starting from $8.95/month and a high speed file hosting service FileBurst!

Please use the contact form for questions or comments about this web site.
Copyright © 2001 Computer Knowledge, All Rights Reserved
Pray the Rosary for peace.