SlideShare a Scribd company logo
1 of 14
You can call them N-S Diagrams if you’d like
There are many different ways of describing an
algorithm in the Design phase:
NS Diagrams
Flowcharts
Pseudo code
…
NS Diagrams are useful for encouraging some aspects
of structured programming techniques.
NS Diagrams are noticeable by their ‘building blocks’
form, of which there are 4 main types..
Any algorithm should be able to be constructed using
one or more of the 4 main parts of an algorithm:
Process – a single step
Conditional – dependant upon choice
Iteration – loop until a condition is met
Module - a grouping of the above which can be
referenced multiple times, from multiple places.
A process block is used to represent a single action
An algorithm is composed of steps or primitives.
E.g.:
Or multiple together:
Process (single step)
Get an egg
Get an egg
Crack the egg
Used to represent a condition leading to two possible
actions (also known as a Boolean)
A branching action is represented by two blocks side
by side meaning: perform the action on the left if the
condition is true, or else perform the action on the
right if the condition is false.
E.g.:
A multiple branching block is used when there are
several alternative actions:
E.g.:
A test first loop block is used when a
set of actions are to be repeated under
a particular condition.
The condition is tested first
Repeated action is represented by a
block within a block, meaning repeat
the action under the conditions stated
Because a test first loop is tested
before any actions it is possible that no
actions take place.
Conditional iteration:
A counted loop is also a test first loop
– repeating the actions a set number of
times and are counted before taking
place.
NOTE: the counting starts before the
loop begins. ‘1’ happens before any eggs
are broken in.
A test last loop is used when a process is repeated
under a particular condition.
The condition is tested last
These repeated actions are tested
at the end of the loop.
E.g. making a pancake mix:
The actions in a test last loop are
always carried out at least once
because the test occurs after the
actions have occurred. So a little
milk will always be added and
stirred.
A sub process block or module is
used in instances where the
process is large enough to
warrant a separate design or
where the process is used several
times in the same diagram.
1. Complete
a. Why are N-S diagrams used when designing
algorithms?
b. What are some other algorithm design tools?
2. What is being tested in test first and test last loops?
3. Express this part of an N-S diagram in words:
Follow the instructions :
Create an N-S diagram for one of the recipes in
K:FilesIPTSSErecipe

More Related Content

What's hot

What's hot (20)

UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
DMBS Indexes.pptx
DMBS Indexes.pptxDMBS Indexes.pptx
DMBS Indexes.pptx
 
Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)
Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)
Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)
 
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
PPT On Microsoft Excel 2007 Full Information.
PPT On Microsoft Excel 2007 Full Information.PPT On Microsoft Excel 2007 Full Information.
PPT On Microsoft Excel 2007 Full Information.
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
 
Modular programming
Modular programmingModular programming
Modular programming
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Graphs data structures
Graphs data structuresGraphs data structures
Graphs data structures
 
1.8 splay tree
1.8 splay tree 1.8 splay tree
1.8 splay tree
 
MS Excel
MS ExcelMS Excel
MS Excel
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computing
 
linked lists in data structures
linked lists in data structureslinked lists in data structures
linked lists in data structures
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Topicos Avanzados de Programacion - Unidad 4 programacion concurrente
Topicos Avanzados de Programacion - Unidad 4 programacion concurrenteTopicos Avanzados de Programacion - Unidad 4 programacion concurrente
Topicos Avanzados de Programacion - Unidad 4 programacion concurrente
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 

Viewers also liked

Desk Chekcing Algorithms
Desk Chekcing AlgorithmsDesk Chekcing Algorithms
Desk Chekcing Algorithms
Kelly Bauer
 
Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02
PUCESA
 
Ciclo de vida del desarrollo de sistemas
Ciclo de vida del desarrollo de sistemasCiclo de vida del desarrollo de sistemas
Ciclo de vida del desarrollo de sistemas
Rick_Ruso
 
Cuarta y quinta generación de computadoras
Cuarta y quinta generación de computadorasCuarta y quinta generación de computadoras
Cuarta y quinta generación de computadoras
anyelalilo
 

Viewers also liked (20)

Psd - Programma Structuur Diagram
Psd - Programma Structuur DiagramPsd - Programma Structuur Diagram
Psd - Programma Structuur Diagram
 
01 diagramas nassi-schneiderman
01 diagramas nassi-schneiderman01 diagramas nassi-schneiderman
01 diagramas nassi-schneiderman
 
Diagramas de Nassi-Shneiderman
Diagramas de Nassi-ShneidermanDiagramas de Nassi-Shneiderman
Diagramas de Nassi-Shneiderman
 
Diagrama nassi sherman
Diagrama nassi shermanDiagrama nassi sherman
Diagrama nassi sherman
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
 
2008 Exam Questions Social And Ethical
2008 Exam Questions Social And Ethical2008 Exam Questions Social And Ethical
2008 Exam Questions Social And Ethical
 
Desk Chekcing Algorithms
Desk Chekcing AlgorithmsDesk Chekcing Algorithms
Desk Chekcing Algorithms
 
Diagrama nassi sherman
Diagrama nassi shermanDiagrama nassi sherman
Diagrama nassi sherman
 
Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02
 
Unidad i
Unidad iUnidad i
Unidad i
 
herramientas case
herramientas caseherramientas case
herramientas case
 
Herranientas case
Herranientas caseHerranientas case
Herranientas case
 
Herramientas Case
Herramientas CaseHerramientas Case
Herramientas Case
 
Ciclo de vida del desarrollo de sistemas
Ciclo de vida del desarrollo de sistemasCiclo de vida del desarrollo de sistemas
Ciclo de vida del desarrollo de sistemas
 
4ta Generacion
4ta Generacion4ta Generacion
4ta Generacion
 
Presentacion algoritmos
Presentacion algoritmosPresentacion algoritmos
Presentacion algoritmos
 
Herramientas case
Herramientas caseHerramientas case
Herramientas case
 
Cuarta y quinta generación de computadoras
Cuarta y quinta generación de computadorasCuarta y quinta generación de computadoras
Cuarta y quinta generación de computadoras
 
Curso de Algoritmos - Presentación 1
Curso de Algoritmos - Presentación 1Curso de Algoritmos - Presentación 1
Curso de Algoritmos - Presentación 1
 
Structured analysis and structured design
Structured analysis  and structured designStructured analysis  and structured design
Structured analysis and structured design
 

Similar to Nassi shneiderman diagrams

Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
VincentAcapen1
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report Implementation
Guo Albert
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
Daniel Katz
 

Similar to Nassi shneiderman diagrams (20)

Algorithm design and problem solving
Algorithm design and problem solvingAlgorithm design and problem solving
Algorithm design and problem solving
 
Chapter 5 java
Chapter 5 javaChapter 5 java
Chapter 5 java
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
 
method_style_ch08.pptx
method_style_ch08.pptxmethod_style_ch08.pptx
method_style_ch08.pptx
 
Loops
LoopsLoops
Loops
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
UNIT 2 PPT.pdf
UNIT 2 PPT.pdfUNIT 2 PPT.pdf
UNIT 2 PPT.pdf
 
Variables in MIT App Inventor powerpoint
Variables in MIT App Inventor powerpointVariables in MIT App Inventor powerpoint
Variables in MIT App Inventor powerpoint
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report Implementation
 
L2624 labriola
L2624 labriolaL2624 labriola
L2624 labriola
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.com
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.com
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.com
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 7, 8 - Pr...
 
Sati Ullah MSD-02....pdf
Sati Ullah MSD-02....pdfSati Ullah MSD-02....pdf
Sati Ullah MSD-02....pdf
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Cis160 Final Review
Cis160 Final ReviewCis160 Final Review
Cis160 Final Review
 
C++ unit-1-part-14
C++ unit-1-part-14C++ unit-1-part-14
C++ unit-1-part-14
 

More from hccit

Snr ipt 10_syll
Snr ipt 10_syllSnr ipt 10_syll
Snr ipt 10_syll
hccit
 
Snr ipt 10_guide
Snr ipt 10_guideSnr ipt 10_guide
Snr ipt 10_guide
hccit
 
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr123 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr12
hccit
 
3 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr113 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr11
hccit
 
10 ict photoshop_proj_2014
10 ict photoshop_proj_201410 ict photoshop_proj_2014
10 ict photoshop_proj_2014
hccit
 
Photoshop
PhotoshopPhotoshop
Photoshop
hccit
 
Flash
FlashFlash
Flash
hccit
 
University partnerships programs email
University partnerships programs emailUniversity partnerships programs email
University partnerships programs email
hccit
 
Griffith sciences pathway programs overview
Griffith sciences pathway programs overviewGriffith sciences pathway programs overview
Griffith sciences pathway programs overview
hccit
 
Griffith info tech brochure
Griffith info tech brochureGriffith info tech brochure
Griffith info tech brochure
hccit
 
Pm sql exercises
Pm sql exercisesPm sql exercises
Pm sql exercises
hccit
 
Repairs questions
Repairs questionsRepairs questions
Repairs questions
hccit
 
Movies questions
Movies questionsMovies questions
Movies questions
hccit
 
Australian birds questions
Australian birds questionsAustralian birds questions
Australian birds questions
hccit
 
Section b
Section bSection b
Section b
hccit
 
Section a
Section aSection a
Section a
hccit
 
Ask manual rev5
Ask manual rev5Ask manual rev5
Ask manual rev5
hccit
 
Case study report mj
Case study report mjCase study report mj
Case study report mj
hccit
 

More from hccit (20)

Snr ipt 10_syll
Snr ipt 10_syllSnr ipt 10_syll
Snr ipt 10_syll
 
Snr ipt 10_guide
Snr ipt 10_guideSnr ipt 10_guide
Snr ipt 10_guide
 
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr123 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr12
 
3 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr113 d modelling_task_sheet_2014_yr11
3 d modelling_task_sheet_2014_yr11
 
10 ict photoshop_proj_2014
10 ict photoshop_proj_201410 ict photoshop_proj_2014
10 ict photoshop_proj_2014
 
Photoshop
PhotoshopPhotoshop
Photoshop
 
Flash
FlashFlash
Flash
 
University partnerships programs email
University partnerships programs emailUniversity partnerships programs email
University partnerships programs email
 
Griffith sciences pathway programs overview
Griffith sciences pathway programs overviewGriffith sciences pathway programs overview
Griffith sciences pathway programs overview
 
Griffith info tech brochure
Griffith info tech brochureGriffith info tech brochure
Griffith info tech brochure
 
Pm sql exercises
Pm sql exercisesPm sql exercises
Pm sql exercises
 
Repairs questions
Repairs questionsRepairs questions
Repairs questions
 
Movies questions
Movies questionsMovies questions
Movies questions
 
Australian birds questions
Australian birds questionsAustralian birds questions
Australian birds questions
 
Section b
Section bSection b
Section b
 
B
BB
B
 
A
AA
A
 
Section a
Section aSection a
Section a
 
Ask manual rev5
Ask manual rev5Ask manual rev5
Ask manual rev5
 
Case study report mj
Case study report mjCase study report mj
Case study report mj
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 

Nassi shneiderman diagrams

  • 1. You can call them N-S Diagrams if you’d like
  • 2. There are many different ways of describing an algorithm in the Design phase: NS Diagrams Flowcharts Pseudo code … NS Diagrams are useful for encouraging some aspects of structured programming techniques. NS Diagrams are noticeable by their ‘building blocks’ form, of which there are 4 main types..
  • 3. Any algorithm should be able to be constructed using one or more of the 4 main parts of an algorithm: Process – a single step Conditional – dependant upon choice Iteration – loop until a condition is met Module - a grouping of the above which can be referenced multiple times, from multiple places.
  • 4. A process block is used to represent a single action An algorithm is composed of steps or primitives. E.g.: Or multiple together: Process (single step) Get an egg Get an egg Crack the egg
  • 5. Used to represent a condition leading to two possible actions (also known as a Boolean) A branching action is represented by two blocks side by side meaning: perform the action on the left if the condition is true, or else perform the action on the right if the condition is false. E.g.:
  • 6. A multiple branching block is used when there are several alternative actions: E.g.:
  • 7. A test first loop block is used when a set of actions are to be repeated under a particular condition. The condition is tested first Repeated action is represented by a block within a block, meaning repeat the action under the conditions stated Because a test first loop is tested before any actions it is possible that no actions take place.
  • 8. Conditional iteration: A counted loop is also a test first loop – repeating the actions a set number of times and are counted before taking place. NOTE: the counting starts before the loop begins. ‘1’ happens before any eggs are broken in.
  • 9. A test last loop is used when a process is repeated under a particular condition. The condition is tested last
  • 10. These repeated actions are tested at the end of the loop. E.g. making a pancake mix: The actions in a test last loop are always carried out at least once because the test occurs after the actions have occurred. So a little milk will always be added and stirred.
  • 11. A sub process block or module is used in instances where the process is large enough to warrant a separate design or where the process is used several times in the same diagram.
  • 12.
  • 13. 1. Complete a. Why are N-S diagrams used when designing algorithms? b. What are some other algorithm design tools? 2. What is being tested in test first and test last loops? 3. Express this part of an N-S diagram in words:
  • 14. Follow the instructions : Create an N-S diagram for one of the recipes in K:FilesIPTSSErecipe