ðHgeocities.com/csit101/Lecture13/Page4.htmlgeocities.com/csit101/Lecture13/Page4.htmlelayedx–ŽÕJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈÀç‹ŒOKtext/htmlpa'9nŒÿÿÿÿb‰.HMon, 29 Nov 1999 00:37:33 GMTeMozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)en, *–ŽÕJŒ Step 2 - Program Design

Step 2 - Program Design

 

After completion of program specification, it is time to begin program design.

  1. In the program design step, you plan a solution to the problem.

  2. There are two tasks in step 2, program design:

    1. Plan the solution

    2. Document the solution
        

  3. The preliminary plan (solution) is laid out using one of the structured programming techniques.

  

  

There are four structured programming techniques that can be used to develop a program:

  1. Top-Down Program Design

    1. Box-like program modules are used to identify each of the program's processing steps.

    2. The logic of the modules must flow from top to the bottom on the structure.

    3. The program must pass in sequence from one module to the next until the computer has processed all modules.

    4. Larger problem (top module) is broken down into smaller problems (lower modules). Each module represents a segment of program code (logically related program statements).

    5. Example:


         

  2. Pseudocode (fake code)

    1. An outline of the logic of the program you will write.

    2. It can contain any form of statements:

      1. Can contain English-like statements.

      2. Can contain statements which include program language code.

    3. Takes the form of an algorithm.

    4. Example:
       

       
        

  3. Flowcharts (program flowcharts)

    1. Graphically represents the detailed sequence of steps needed to solve the problem.

    2. It uses standard flowcharting symbols.

    3. Example:

         

  4. Logic structures

    1. Used to complete the logic of the program flow.

    2. Uses a combination of three structures:

      1. Sequence Structure - One program statement follows another. 
          

      2. Selection Structure - Follows a path when a decision is made - IF ELSE
          

      3. Loop Structure - Repeated processes. Also known as iteration. Uses DO UNTIL or DO WHILE variations for the loop structure.
         

  

  

Before leaving the program design step, you must document the logic of the design.

  1. The report should include pseudocode, flowcharts, and logic structures.

  2. When documentation is complete, then you can proceed to step 3, coding the program.

  

  

<  Previous Page                                         Next Page >