Title: Nassi-Shneiderman Charts
1Nassi-Shneiderman Charts
2Background
- 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.
3Agenda
- 1)Â Â Â Â Â Overview
- 2)Â Â Â Â Â Primary Uses
- 3) Advantages
- 4)Â Â Â Â Â Disadvantages
- 5)Â Â Â Â Â Relationship with Other Techniques
- 6) Symbols
- 7)Â Â Â Â Â Examples
- 8)Â Â Â Â Â Resources/Tools
- 9) Group projects
4Overview
- Nassi-Shneiderman charts have four primary uses
- Creating the logic design
- Programming from the charts
- Writing program documentation
- Maintenance of the program
5Primary 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
6Primary 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
7Primary 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!
8Primary 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.
9Advantages - 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
10Advantages 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
11Advantages 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
12Disadvantages
- 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
13Relationship 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
14Symbols
- 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
15Process
- A stackable box is used to represent a sequence
or process
Step 1
Step 2
Step 3
16Decision (Selection)
If
(then)
(else)
17Decision (Selection)
- The case/switch/selection statement
18Iteration
While
Repeat Until
19Graduation Example N-S Chart
20Graduation 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
21Newspaper Subscription N-S Chart
22Newspaper Subscription Pseudocode
23Drawing 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
24Drawing 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
25User 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
26Editor 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
27Visio Screen Shot
28MS Visio Example
29Editor 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
30StruktoGraaf Screen Shot
31StruktoGraaf Screen Shot (Cont.)
32Summary
- 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
33References
- 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 - Â
34References (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
35Class Exercises