structured programming l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Structured Programming PowerPoint Presentation
Download Presentation
Structured Programming

Loading in 2 Seconds...

play fullscreen
1 / 9

Structured Programming - PowerPoint PPT Presentation


  • 208 Views
  • Uploaded on

Structured Programming.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Structured Programming' - daveigh


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
structured programming
Structured Programming
  • structured programming: A technique for organizing and coding computer programs in which a hierarchy of modules is used, each having a single entry and a single exit point, and in which control is passed downward through the structure without unconditional branches to higher levels of the structure. Three types of control flow are used: sequential, test, and iteration.
advantages of structured programming
Advantages of Structured Programming
  • Easy to write:Modular design increases the programmer's productivity by allowing them to look at the big picture first and focus on details later.Several Programmers can work on a single, large program, each working on a different moduleStudies show structured programs take less time to write than standard programs.Procedures written for one program can be reused in other programs requiring the same task. A procedure that can be used in many programs is said to be reusable
slide3
Easy to debugSince each procedure is specialized to perform just one task, a procedure can be checked individually. Older unstructured programs consist of a sequence of instructions that are not grouped for specific tasks. The logic of such programs is cluttered with details and therefore difficult to follow.Easy to UnderstandThe relationship between the procedures shows the modular design of the program.Meaningful procedure names and clear documentation identify the task performed by each moduleMeaningful variable names help the programmer identify the purpose of each variable.Easy to ChangeSince a correctly written structured program is self-documenting, it can be easily understood by another programmer.
top down design
Top Down Design
  • Top Down Design is a method of designing something that starts with the complete item then breaks it down into smaller and smaller components. In programming it means breaking a difficult task down (divide and conquer) and solving pieces independently until every step can easily be implemented (successive refinement).
dog house example
1. Floor or Base

2. Walls

2.1 Back Wall

2.1.1 Top section2.1.2 Lower section

2.2. Left Wall2.3 Right Wall2.4 Front Wall

2.4.1 Top section2.4.2 Door section

3. Roof

3.1 Left Side3.2 Right Side

Dog House Example
slide6
Prepare all sections as described below then join sections using nails and glue as specified.
  • 1. Floor or Base - cut to specified size and smooth edges
  • 2. Walls
    • 2.1 Back Wall
    • 2.1.1 Top section - cut triangular shape2.1.2 Lower section - cut square shape and glue and staple to upper part of wall
    • 2.2. Left Wall - cut to specified dimensions2.3 Right Wall - cut to specified dimensions2.4 Front Wall
    • 2.4.1 Top section - cut triangular piece to specified dimensions2.4.2 Door section - use jigsaw to cut U shape for the door in square shape, staple and glue to top section
  • 3. Roof
    • 3.1 Left Side - cut to specified dimensions3.2 Right Side - cut to specified dimensions
slide8
Hierarchical systems seem to have a property that something considered as an undivided entity on one level is considered as a composite object on the next lowest level of greater detail: as a result, the natural grain of space or time that is applicable at each level decreases by an order of magnitude when we shift our attention from one level to the next lower one. We understand walls in terms of bricks, bricks in terms of crystals, crystals in terms of molecules, etc.-----E. Dijkstra
slide9
The Fundamental Principle of Structured Programming is that at all times and under all circumstances, the programmer must keep the program within his intellectual grasp. The well-known methods for achieving this can be briefly summarized as follows: 1) top-down design and construction, 2) limited control structures, and 3) limited scope of data structures.-----Tom Harbron
  • A study of program structure has revealed that programs can differ tremendously in their intellectual manageability. A number of rules have been discovered, violations of which will either seriously impair or totally destroy the intellectual manageability of the program....I now suggest that we confine ourselves to the design and implementation of intellectually manageable programs.-----E. Dijkstra