SlideShare a Scribd company logo
1 of 16
You can call them N-S Diagrams if you’d like
Intro…
 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..
Algorithm design
 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.
Process blocks
 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
Conditional: 2 way branch
 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.:
Conditional: multiple branches
 A multiple branching block is used when there are
several alternative actions:
 E.g.:
Iteration: Test first loop
 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.
Examples of test first loop
 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.
Iteration: Test Last loop
 A test last loop is used when a process is repeated
under a particular condition.
 The condition is tested last
Example of test last block
 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.
Modules: sub process blocks
 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.
Some questions:
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:
More questions:
 Follow the instructions :
A practical (sort of) example:
Now your turn!
1. Go to taste.com.au
2. Find an awesome, tasty looking recipe
3. Turn it into an NS Diagram
4. Make it
5. Bring it to school
6. Group evaluation!!!! 

More Related Content

What's hot

Autosys Complete Guide
Autosys Complete GuideAutosys Complete Guide
Autosys Complete Guidekarunakar81987
 
Programación Orientada a Objetos - Resumen
Programación Orientada a Objetos - ResumenProgramación Orientada a Objetos - Resumen
Programación Orientada a Objetos - ResumenKarlytoz_36
 
Tesis de church turing1
Tesis de church turing1Tesis de church turing1
Tesis de church turing1Sergio Rangel
 
Ejercidos resueltos en java para el portafolio
Ejercidos resueltos en java para el portafolioEjercidos resueltos en java para el portafolio
Ejercidos resueltos en java para el portafolioJesica Pérez
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming LanguageAhmad Idrees
 
Workshop: Unit Testing in Python
Workshop: Unit Testing in PythonWorkshop: Unit Testing in Python
Workshop: Unit Testing in PythonDavid Tan
 
4 1 recopilacion con metodos interactivos
4 1 recopilacion con metodos interactivos4 1 recopilacion con metodos interactivos
4 1 recopilacion con metodos interactivosGiovani Ramirez
 
Polimorfismo ppt
Polimorfismo  pptPolimorfismo  ppt
Polimorfismo pptivanvillar7
 
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de Usuario
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de UsuarioTopicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de Usuario
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de UsuarioJosé Antonio Sandoval Acosta
 
Metodologías de programación orientado a eventos y distribuida
Metodologías de programación orientado a eventos y distribuidaMetodologías de programación orientado a eventos y distribuida
Metodologías de programación orientado a eventos y distribuidaSergio Olivares
 
Cuaderno de-ejercicios-y-practicas-c-winapi
Cuaderno de-ejercicios-y-practicas-c-winapiCuaderno de-ejercicios-y-practicas-c-winapi
Cuaderno de-ejercicios-y-practicas-c-winapiVictor Basurto Alonso
 
Diagramas De Estado
Diagramas De EstadoDiagramas De Estado
Diagramas De Estadoguest5ed375
 

What's hot (20)

Alice 14
Alice 14Alice 14
Alice 14
 
Autosys Complete Guide
Autosys Complete GuideAutosys Complete Guide
Autosys Complete Guide
 
Funciones recursivas en C++
Funciones recursivas en C++Funciones recursivas en C++
Funciones recursivas en C++
 
Programación Orientada a Objetos - Resumen
Programación Orientada a Objetos - ResumenProgramación Orientada a Objetos - Resumen
Programación Orientada a Objetos - Resumen
 
History of OOP
History of OOPHistory of OOP
History of OOP
 
Tesis de church turing1
Tesis de church turing1Tesis de church turing1
Tesis de church turing1
 
Ejercidos resueltos en java para el portafolio
Ejercidos resueltos en java para el portafolioEjercidos resueltos en java para el portafolio
Ejercidos resueltos en java para el portafolio
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
 
Workshop: Unit Testing in Python
Workshop: Unit Testing in PythonWorkshop: Unit Testing in Python
Workshop: Unit Testing in Python
 
1 .java basic
1 .java basic1 .java basic
1 .java basic
 
4 1 recopilacion con metodos interactivos
4 1 recopilacion con metodos interactivos4 1 recopilacion con metodos interactivos
4 1 recopilacion con metodos interactivos
 
Polimorfismo ppt
Polimorfismo  pptPolimorfismo  ppt
Polimorfismo ppt
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de Usuario
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de UsuarioTopicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de Usuario
Topicos Avanzados de Programacion - Unidad 2 GUI Interfaz Grafica de Usuario
 
Metodologías de programación orientado a eventos y distribuida
Metodologías de programación orientado a eventos y distribuidaMetodologías de programación orientado a eventos y distribuida
Metodologías de programación orientado a eventos y distribuida
 
Cuaderno de-ejercicios-y-practicas-c-winapi
Cuaderno de-ejercicios-y-practicas-c-winapiCuaderno de-ejercicios-y-practicas-c-winapi
Cuaderno de-ejercicios-y-practicas-c-winapi
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
 
Diagramas De Estado
Diagramas De EstadoDiagramas De Estado
Diagramas De Estado
 
Applet in java
Applet in javaApplet in java
Applet in java
 
Assemblies
AssembliesAssemblies
Assemblies
 

Viewers also liked

Viewers also liked (20)

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
 
Unidad i
Unidad iUnidad i
Unidad i
 
Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02Cfakepathcase001easycase 100226175922-phpapp02
Cfakepathcase001easycase 100226175922-phpapp02
 
herramientas case
herramientas caseherramientas case
herramientas case
 
The 99.999 percent cybersecurity problem
The 99.999 percent cybersecurity problemThe 99.999 percent cybersecurity problem
The 99.999 percent cybersecurity problem
 
CGA Millennials in the Workforce
CGA Millennials in the WorkforceCGA Millennials in the Workforce
CGA Millennials in the Workforce
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
 
Herranientas case
Herranientas caseHerranientas case
Herranientas case
 
Medición del radio terrestre Proyecto Eratóstenes
Medición del radio terrestre Proyecto EratóstenesMedición del radio terrestre Proyecto Eratóstenes
Medición del radio terrestre Proyecto Eratóstenes
 
The Live Online Class
The Live Online ClassThe Live Online Class
The Live Online Class
 
RESUME
RESUMERESUME
RESUME
 
Basics of Html
 Basics of Html Basics of Html
Basics of Html
 
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
 
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
 
Herramientas Case
Herramientas CaseHerramientas Case
Herramientas Case
 
Abdel Hamied Lotfy cv
Abdel Hamied Lotfy cvAbdel Hamied Lotfy cv
Abdel Hamied Lotfy cv
 

Similar to Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)

Algorithm design and problem solving
Algorithm design and problem solvingAlgorithm design and problem solving
Algorithm design and problem solvingGwatso
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01VincentAcapen1
 
method_style_ch08.pptx
method_style_ch08.pptxmethod_style_ch08.pptx
method_style_ch08.pptxssuser0d0f881
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 
C++ unit-1-part-14
C++ unit-1-part-14C++ unit-1-part-14
C++ unit-1-part-14Jadavsejal
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Luigi Vanfretti
 
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 ImplementationGuo Albert
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comStephenson34
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.comWilliamsTaylorzl
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comHarrisGeorgx
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck200
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck2380
 

Similar to Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit) (20)

Algorithm design and problem solving
Algorithm design and problem solvingAlgorithm design and problem solving
Algorithm design and problem solving
 
Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01Introductiontoflowchart 110630082600-phpapp01
Introductiontoflowchart 110630082600-phpapp01
 
Loops
LoopsLoops
Loops
 
Chapter 5 java
Chapter 5 javaChapter 5 java
Chapter 5 java
 
L2624 labriola
L2624 labriolaL2624 labriola
L2624 labriola
 
method_style_ch08.pptx
method_style_ch08.pptxmethod_style_ch08.pptx
method_style_ch08.pptx
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
UNIT 2 PPT.pdf
UNIT 2 PPT.pdfUNIT 2 PPT.pdf
UNIT 2 PPT.pdf
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
C++ unit-1-part-14
C++ unit-1-part-14C++ unit-1-part-14
C++ unit-1-part-14
 
Unit 3 part2
Unit 3 part2Unit 3 part2
Unit 3 part2
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!
 
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
 
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
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.com
 
cs1538.ppt
cs1538.pptcs1538.ppt
cs1538.ppt
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 

Recently uploaded

How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLkapoorjyoti4444
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPanhandleOilandGas
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 MonthsIndeedSEO
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...daisycvs
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...lizamodels9
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Sheetaleventcompany
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1kcpayne
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon investment
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noidadlhescort
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture conceptP&CO
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 

Recently uploaded (20)

How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
Call Girls Kengeri Satellite Town Just Call 👗 7737669865 👗 Top Class Call Gir...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 

Nassi Shneiderman Diagrams: Algorithms Made Easier (at least a little bit)

  • 1. You can call them N-S Diagrams if you’d like
  • 2. Intro…  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. Algorithm design  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. Process blocks  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. Conditional: 2 way branch  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. Conditional: multiple branches  A multiple branching block is used when there are several alternative actions:  E.g.:
  • 7. Iteration: Test first loop  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. Examples of test first loop  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. Iteration: Test Last loop  A test last loop is used when a process is repeated under a particular condition.  The condition is tested last
  • 10. Example of test last block  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. Modules: sub process blocks  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. Some questions: 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:
  • 13. More questions:  Follow the instructions :
  • 14. A practical (sort of) example:
  • 15.
  • 16. Now your turn! 1. Go to taste.com.au 2. Find an awesome, tasty looking recipe 3. Turn it into an NS Diagram 4. Make it 5. Bring it to school 6. Group evaluation!!!! 