Nassi-Shneiderman Charts - PowerPoint PPT Presentation

About This Presentation
Title:

Nassi-Shneiderman Charts

Description:

free download for a demo or about $30 dollars for a user license ... A free download for a demo, about 135 (or student version for 57) for a user license ... – PowerPoint PPT presentation

Number of Views:1076
Avg rating:3.0/5.0
Slides: 36
Provided by: userpag
Category:

less

Transcript and Presenter's Notes

Title: Nassi-Shneiderman Charts


1
Nassi-Shneiderman Charts
  • Andrea Schumacher

2
Background
  • Nassi-Shneiderman (N-S) charts were initially
    developed in the early 1970s by Ike Nassi and
    Ben Shneiderman
  • They are based on and perform a function similar
    to flowcharts
  • The initial purpose was to develop a technique to
    chart the logic design of structured programs
  • N-S Charts are also know as Program Structure
    Diagrams (PSD) and Chapin Charts.

3
Agenda
  • 1)      Overview
  • 2)      Primary Uses
  • 3) Advantages
  • 4)      Disadvantages
  • 5)      Relationship with Other Techniques
  • 6) Symbols
  • 7)      Examples
  • 8)      Resources/Tools
  • 9) Group projects

4
Overview
  • Nassi-Shneiderman charts have four primary uses
  • Creating the logic design
  • Programming from the charts
  • Writing program documentation
  • Maintenance of the program

5
Primary Uses1. Creating the Logic Design
  • As mentioned previously this was the initial
    purpose of Nassi-Shneiderman charts
  • They can be thought of as the building blocks of
    the design
  • The completed chart is the blueprint for the
    program code

6
Primary Uses2. Programming From the Charts
  • The N-S chart can be use to do the actual
    programming
  • It can be considered as a type of pictorial
    pseudocode
  • Some of the N-S editors convert the diagram
    directly into source code

7
Primary Uses3. Writing Program Documentation
  • The N-S chart is a pictorial representation of
    the logical design of the program
  • Using the N-S chart as an actual part of the
    documentation is a great idea!

8
Primary Uses4. Maintenance of the Program
  • N-S charts provide a quick reference to the
    structure and design of the program which helps
    during on-going maintenance and upgrades.

9
Advantages - General
  • One main advantage is that N-S charts adopt the
    structured programming philosophy
  • N-S charts use only a few symbols which make them
    easier to learn then traditional flowcharts
  • They help to recognize missing policies or
    procedures from business rules
  • Completed charts should fit on one page, there
    are no complex arrows to follow

10
Advantages General (cont.)
  • Have one entry point and one exit point
  • They can be nested to show complex procedures
  • N-S charts are independent of any specific
    programming language

11
Advantages Programming
  • The logic is documented in the N-S chart so
    regardless of the coding language used, N-S
    charts make coding much easier then starting from
    scratch
  • Clearly displays sequence, selection, and
    repetition (such as nested loops) to make
    debugging easier
  • Confusing GOTOs are not represented

12
Disadvantages
  • They can be difficult to draw
  • They can be harder to update or change then
    traditional flow charts because everything stays
    together
  • They must be comprehensive to be understood

13
Relationship with Other Techniques
Kind of Technique
Example Technique
Relation
  • The activities/processes defined
  • in the process models can be further
  • described in detail in a N-S chart
  • A N-S chart can also be used as a
  • translation of process model

wwwis.cs.utwente.nl
14
Symbols
  • Only 3 basic symbols used in N-S charts
  • Process (Sequence)
  • Decision (Selection)
  • Iteration (Repetition)
  • Other symbols are used but they are based on
    these three symbols

15
Process
  • A stackable box is used to represent a sequence
    or process

Step 1
Step 2
Step 3
16
Decision (Selection)
  • The if-then-else

If
(then)
(else)
17
Decision (Selection)
  • The case/switch/selection statement

18
Iteration
  • These symbols show loops

While
Repeat Until
19
Graduation Example N-S Chart
20
Graduation Example Pseudocode
While FOR ALL SECOND-YEAR STUDENTS do if
ENOUGH CREDITS? then YES if BILLS
PAID? then YES GRANT DIPLOMA
else NO NO DIPLOMA
end if else NO NO DIPLOMA
end if end while
21
Newspaper Subscription N-S Chart
22
Newspaper Subscription Pseudocode
23
Drawing Hints
  • The size of the final rectangle has no bearing on
    the program
  • Fit one drawing to a page
  • They work the best with small or medium-sized
    programs
  • Draw the major loops first, complete the inner
    loops later

24
Drawing Hints
  • Nested loops are indented, of course as the
    number of nested loops increase, the width of the
    chart changes
  • Sub-procedures can be drawn using a different N-S
    chart
  • If the N-S diagram is cluttered it may be the
    policy you are diagramming is unclear

25
User Comments
  • The University of Liverpool develop a N-S editor
    using a VAX based Pascal complier called NSEDIT
  • User responses
  • 60 agreed that it helped to ensure the correct
    syntax
  • 21 said it enforced structured programming
  • 12 felt it made the transition from design to
    code easier

26
Editor Downloads/Tools
  • Nassi-Shneiderman Diagrams Editor for Unix
  • http//www.kfa-juelich.de/zam/nassi/
  • free download for a demo or about 30 dollars for
    a user license
  • Microsoft Visio 2000 supports N-S charts

27
Visio Screen Shot
28
MS Visio Example
29
Editor Downloads (cont.)
  • StruktoGraaf 3.0 Windows 95/98/ME/NT/2000
  • http//www.sichemsoft.nl/producuk.html
  • A free download for a demo, about 135 (or
    student version for 57) for a user license

30
StruktoGraaf Screen Shot
31
StruktoGraaf Screen Shot (Cont.)
32
Summary
  • We have seen some of the advantages and
    disadvantages of using Nassi-Shneiderman charts
  • I think you can clearly see the benefits to using
    N-S charts for system design as well as
    documentation and maintenance

33
References
  • Beek, Marcel, Koolen, Hans, Van Setten, Mark
    (1996), Program Structure Diagrams, (visited
    3/18/01), wwwis.cs.utwente.nl8080/dmrg/mee/misop.
    htm
  • Cary, David (2000) Nassi-Shneiderman on the
    Web, (visited 3/18/01), www.rdrop.com/cary/html/
    psd.html
  •  
  • Coenen, Frans Comp101 Design and Style
    Review, (visited 3/6/01), www.csc.liv.ac.uk/fran
    s/comp101/week9/designAndStyle.htm.
  •  
  • Halewood, K. and Woodward M.R. (1988), NSEDIT
    A Syntax-directed Editor and Testing Tool based
    on Nassi-Shneiderman Charts, Software-Practice
    and Experience, Vol. 18, No.10, pp. 987-998
  •  
  • Juch, Forschungszentrum (1997) Nassi
    Tutorial,(visited 3/12/01), www.kfa-juelich.de/za
    m/nassi/tutorial.html
  •  
  • Kendall, Kenneth E. and Kendall, Julie E. (1999)
    System Analysis and Design, Prentice Hall, New
    Jersey
  •  

34
References (cont.)
  • Seesing, Paul R. (1993), Basic System Analysis
    Tools for Computer Users, (visited 4/9/01),
    www.open.org/prslkg/sy_chap.htm
  •  
  • Tiemann, Peter Nassi-Shneiderman Charts,
    (visited 4/9/01), www.preview.org/software/sc_help
    /nassishneiderman
  •  
  • Why Should I Use Structograms? (visited
    4/9/01), www.blue-river-software.com/products/whys
    tructs.htm
  •  
  • Weiss, Edmond H. (1990). Visualizing a
    Procedure with Nassi-Schneiderman Charts,
    Journal of Technical Writing and Communication,
    Vol. 20, No.3, pp. 237-254
  • Woodward, M.R. (1987) The Use of
    Nassi-Shneiderman Charts and Supporting Tools in
    Software Engineering Education, Computer
    Education, Vol. 11, No. 4, pp. 267-279

35
Class Exercises
Write a Comment
User Comments (0)
About PowerShow.com