1 / 14

JACKSON Structured Programming

JACKSON Structured Programming. It was developed by Michael Jackson – it is a systematic technique for mapping the structure of a problem into program structure. The mapping is accomplished in 3 steps. Specifying input and output data structures using tree structured diagrams

Download Presentation

JACKSON Structured Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JACKSON Structured Programming

  2. It was developed by Michael Jackson – it is a systematic technique for mapping the structure of a problem into program structure

  3. The mapping is accomplished in 3 steps • Specifying input and output data structures using tree structured diagrams • Identify the correspondence between nodes in the output and input trees • The structural model of the program is expanded into a detailed design model that contains the operations needed to solve the problem

  4. Input and output structure are specified using a graphical notation to specify data hierarchy Sequences of data Repetition of data items alternate data items

  5. A First Step : Tree Structure B C D E F G H I

  6. Second Step • Identify the points of commonality in the input and output structure and combining the two structures into a program structure

  7. Third Step It has 3 sub steps 1) A list of operations required to perform the processing steps is developed 2) The operations are associated with the program structure 3) Program structure and operations are expressed in a notation called schematic logic, which is stylized pseudo code. Control flow for selection and iteration are specified in this step.

  8. Example • Input file – collection of inventory records sorted by part number • Part number – each record contains it (field). It’s the number of units of that item issued or received in one transaction • Output record - contains heading and Net movement line for each part number in the input file • Because the input file is sorted by part number, all issues and receipts of a given part number are in a contiguous portion of the file called a part group. • Each record in the part group is called a movement record.

  9. Step 1: Tree Structure (i/o struct) Input file Output Record Part Group Heading Body Movement Record Net Movement Line Issue Receipt

  10. Step 2: Correspondence Input file Output Record Part Group Heading Body Movement Record Net Movement Line Issue Receipt

  11. After corresponding the resultant structure will be as follows: It’s a program structure for an inventory problem program Process heading Process Body Process PTGP and Line Process PTGP body Process Line Process Record Process issue Process Receipt

  12. Step3 : Sub Step1 List of Operations needed in the inventory program • Open Files • Close Files • Stop Run • Read a record into PART_NUM,MOVMNT • Write Heading • Write NET_MOVEMENT Line • Set Net_Movmnt to zero • Add MovMnt to Net_Movmnt • Subtract movmnt from net_movment

  13. Sub Step 2 (Association of Operations) program Process heading Process Body 2 3 1 4 5 Process PTGP and Line Process PTGP body Process Line 7 6 Process Record 4 9 Process issue Process Receipt 8

  14. Sub Step 3 (Schematic Logic Representation) BEGIN PROGRAM OPEN FILES READ PART_NUM, MOVMNT WRITE HEADING ITERATE WHILE NOT(END-OF-FILE) SET NET-MOVMNT TO ZERO ITERATE WHILE SAME-PART-NUM IF (MOVMNT= ISSUE) THEN SUB MOVMNT FROM NET-MOVMNT ELSE IF (MOVMNT = RECEIPT) THEN ADD MOVMNT TO NET-MOVMNT END IF READ PART-NUM,MOVMNT END WHILE WRITE NET-MOVEMENT LINE END WHILE CLOSE FILES STOP END PROGRAM

More Related