SEG3430 Systems Analysis and Design Tutorial 11 Structure Chart and Program Specification - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

SEG3430 Systems Analysis and Design Tutorial 11 Structure Chart and Program Specification

Description:

SEG3430 Systems Analysis and Design. Tutorial 11 Structure Chart and Program Specification ... Use the CALL keyword. Example of Pseudocode (Robot Move module) ... – PowerPoint PPT presentation

Number of Views:523
Avg rating:3.0/5.0
Slides: 21
Provided by: seem2
Category:

less

Transcript and Presenter's Notes

Title: SEG3430 Systems Analysis and Design Tutorial 11 Structure Chart and Program Specification


1
SEG3430 Systems Analysis and DesignTutorial 11
Structure Chart and Program Specification
2
Outline
  • Structure Chart
  • Program Specification

3
Structure Chart
  • The structure chart is an important technique
    that helps the analyst design the program for the
    new system.
  • There are three components in the structured
    chart modules, connections between modules, and
    communication between modules.

4
Structure Chart Example
5
Structure Chart Elements
  • Module Denote a logical piece of program
  • Library Denote a logical piece of program that
    is repeated in a structure chart
  • Loop A module is repeated
  • Conditional Line Subordinate modules are invoked
    by control modules based on some conditions.
  • Control Couple Communicates that a message or
    system flag is being passed from one module to
    another
  • Data Couple Communicates that data is being
    passed from one module to another
  • Off Page Identifies when the part of the diagram
    are continued on another page of structure chart.
  • On Page Identifies when the part of the diagram
    are continued somewhere else on the same page of
    the structure chart.

6
Structure Chart Elements
7
Creating a structure chartfrom a DFD
  • Following the hierarchy of the DFDs, simply hang
    modules below their parent modules..
  • 1. Identify Modules and Levels
  • 2. Identify Special Connections
  • 3. Add Couples
  • 4. Revise Structure Chart

8
Example for creating a structure chartfrom a DFD
  • The CD Selections Process

9
Identify Modules and Levels
10
Identify Special Connections
11
Add Couples
12
Program Specification
  • Describe the individual modules in detail so that
    programmers can take over and begin writing code.
  • Program specifications can pinpoint design
    problems that exist in the structure chart.
  • There is no formal syntax for a program
    specification.

13
Components
  • Most program specification forms contain four
    components
  • Program information
  • Events
  • Inputs and Outputs
  • Pseudocode

14
Example of a program specification form
15
Example of the CD selection
16
Pseudocode
  • A detail outline of the lines of code.
  • A language that contains logical structures,
    including sequential statements, conditional
    statements, and iteration.
  • Pseudocode is much more like real code.

17
Pseudocode
  • The vocabulary used in the pseudocode should be
    the vocabulary of the problem domain, not of the
    implementation domain.
  • E.g.
  • Extract the next word from the line (good)
  • set word to get next token (poor)
  • The logic must be decomposed to the level of a
    single loop or decision.
  • E.g. Search the list and find the customer with
    highest balance

18
Pseudocode
  • No program language specific
  • Format recommended
  • Structure
  • SEQUENCE, WHILE, IF-THEN-ELSE, REPEAT-UNTIL, FOR,
    and CASE
  • Invoking subprocedures
  • Use the CALL keyword

19
Example of Pseudocode
 
 
 
 
 
 
  • (Robot Move module)
  • IF robot has no obstacle in front
  • THEN
  • Call Move robot
  • Add the move command to the command history
  • RETURN true
  • ELSE
  • RETURN false without moving the robot
  • END IF

20
Example of Pseudocode
  • Example Java Implementation
  • source code statements are interleaved with
    pseudocode.
  • comments that correspond exactly to source code
    are removed during coding.
  • public boolean moveRobot (Robot aRobot)    
    //IF robot has no obstacle in front THEN     if
    (aRobot.isFrontClear())             // Call
    Move robot         aRobot.move()         //
    Add the move command to the command history
            cmdHistory.add(RobotAction.MOVE)
            return true         else // don't
    move the robot             return false    
    //END IF
Write a Comment
User Comments (0)
About PowerShow.com