SlideShare a Scribd company logo
1 of 104
Flow Charting

 Damian Gordon
Introduction
• We mentioned it already, that if we thing of an
  analyst as being analogous to an
  architect, and a developer as being analogous
  to a builder, then the most important thing we
  can do as analysts is to explain our designs to
  the developers in a simple and clear way.

• How do architects do this?
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and print it out.
START
START




Read in A
START




Read in A




 Print A
START




Read in A




 Print A




  END
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and print it out double the number.
START
START




Read in A
START




Read in A




Print A*2
START




Read in A




Print A*2




  END
Or alternatively...
START
START




Read in A
START




Read in A




B = A*2
START




Read in A
               B=A*2

                can be
B = A*2         read as

             “B gets the
              value of A
            multiplied by 2”
START




Read in A




B = A*2




 Print B
START




Read in A




B = A*2




 Print B




  END
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number, check if it is odd or even.
START
START




Read in A
START




Read in A




 Does A/2
  give a
remainder?
START




                         Read in A




                          Does A/2
Print “It’s Odd”   Yes
                           give a
                         remainder?
START




                         Read in A




                          Does A/2    No
Print “It’s Odd”   Yes                     Print “It’s Even”
                           give a
                         remainder?
START




                         Read in A




                          Does A/2    No
Print “It’s Odd”   Yes                     Print “It’s Even”
                           give a
                         remainder?




                           END
Flowcharts
• So let’s say we want to express the
  following algorithm to print out the bigger
  of two numbers:
  – Read in two numbers, call them A and B. Is A is bigger
    than B, print out A, otherwise print out B.
START
START




Read in A and B
START




Read in A and B




    A>B?
START




                Read in A and B




Print A   Yes
                    A>B?
START




                Read in A and B




          Yes                     No
Print A             A>B?               Print B
START




                Read in A and B




          Yes                     No
Print A             A>B?               Print B




                     END
Flowcharts
• So let’s say we want to express the
  following algorithm to print out the bigger
  of three numbers:
  – Read in three numbers, call them A, B and C.
     • If A is bigger than B, then if A is bigger than C, print out
       A, otherwise print out C.
     • If B is bigger than A, then if B is bigger than C, print out
       B, otherwise print out C.
START
START




Read in A, B and C
START




Read in A, B and C




      A>B?
START




             Read in A, B and C




       Yes
A>C?               A>B?
START




             Read in A, B and C




       Yes                        No
A>C?               A>B?                B>C?
START




             Read in A, B and C




       Yes                        No
A>C?               A>B?                B>C?


  No                                     No




                  Print C
START




                           Read in A, B and C




Yes                  Yes                        No
         A>C?                    A>B?                B>C?


                No                                     No




      Print A                   Print C
START




                           Read in A, B and C




Yes                  Yes                        No                    Yes
         A>C?                    A>B?                B>C?


                No                                     No




      Print A                   Print C                     Print B
START




                           Read in A, B and C




Yes                  Yes                        No                    Yes
         A>C?                    A>B?                B>C?


                No                                     No




      Print A                   Print C                     Print B




                                 END
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Print out the numbers from 1 to 5
START
START


Print 1
START


Print 1


Print 2
START


Print 1


Print 2


Print 3
START


Print 1


Print 2


Print 3


Print 4
START


Print 1


Print 2


Print 3


Print 4


Print 5
START


Print 1


Print 2


Print 3


Print 4


Print 5


 END
Or alternatively...
Flowcharts            A=A+1

• If I say A = A + 1, that means “A gets the
  value of whatever is in itself, plus 1”
• If A is 14
• It becomes 15
                           14        +1
                           A (old)


                                          15
                                         A   (new)
START
START


A=1
START


 A=1




Is A==6?
START


 A=1




           No
Is A==6?        Print A
START


 A=1


                A=A+1

           No
Is A==6?        Print A
START


 A=1


                A=A+1

           No
Is A==6?        Print A
START


 A=1


                A=A+1

           No
Is A==6?        Print A




Yes

  END
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Add up the numbers 1 to 5
Flowcharts              T=5

• But first a few points;
• If I say T = 5, that means “T gets the value
  5”
Flowcharts              T=5

• But first a few points;
• If I say T = 5, that means “T gets the value
  5”




                T
Flowcharts              T=5

• But first a few points;
• If I say T = 5, that means “T gets the value
  5”

                         5

                T
Flowcharts              T=X

• If I say T = X, that means “T gets the value
  of whatever is in the variable X”
Flowcharts              T=X

• If I say T = X, that means “T gets the value
  of whatever is in the variable X”
• So if X is 14, then T will get the value 14.
Flowcharts            T=X

• If I say T = X, that means “T gets the value
  of whatever is in the variable X”
• So if X is 14, then T will get the value 14.

                        14
                        X
              14
               T
Flowcharts            T=X+1

• If I say T = X+1, that means “T gets the
  value of whatever is in the variable X plus
  one”
Flowcharts            T=X+1

• If I say T = X+1, that means “T gets the
  value of whatever is in the variable X plus
  one”
• So if X is 14, T becomes 15, and X stays as
  14.
Flowcharts            T=X+1

• If I say T = X+1, that means “T gets the
  value of whatever is in the variable X plus
  one”
• So if X is 14, T becomes 15, and X stays as
  14.
              +1     14
                     X
        15
         T
Flowcharts           T=T+X

• If I say T = T + X, that means “T gets the
  value of whatever is in itself plus whatever
  is in the variable X”
Flowcharts           T=T+X

• If I say T = T + X, that means “T gets the
  value of whatever is in itself plus whatever
  is in the variable X”
• If T is 14 and X is 9
• T becomes 23
• X stays at 9
Flowcharts             T=T+X

• If I say T = T + X, that means “T gets the
  value of whatever is in itself plus whatever
  is in the variable X”
• If T is 14 and X is 9
• T becomes 23
                             14                  9
• X stays at 9               T(old)              X
                                    23
                                    T(new)
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Add up the numbers 1 to 5
START
START


Total = 0
START


Total = 0


 A=1
START


Total = 0


 A=1




Is A==6?
START


Total = 0


 A=1




            No
Is A==6?         Total = Total + A;
START


Total = 0


 A=1


                    A=A+1

            No
Is A==6?         Total = Total + A;
START


Total = 0


 A=1


                    A=A+1

            No
Is A==6?         Total = Total + A;




Yes

  END
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and check if it’s a prime number.
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and check if it’s a prime number.
  – What’s a prime number?
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and check if it’s a prime number.
  – What’s a prime number?
  – A number that’s only divisible by itself and 1, e.g. 7.
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and check if it’s a prime number.
  – What’s a prime number?
  – A number that’s only divisible by itself and 1, e.g. 7.
  – Or to put it another way, every number other than itself and 1
    gives a remainder, e.g. For 7, if 6, 5, 4, 3, and 2 give a remainder
    then 7 is prime.
Flowcharts
• So let’s say we want to express the
  following algorithm:
  – Read in a number and check if it’s a prime number.
  – What’s a prime number?
  – A number that’s only divisible by itself and 1, e.g. 7.
  – Or to put it another way, every number other than itself and 1
    gives a remainder, e.g. For 7, if 6, 5, 4, 3, and 2 give a remainder
    then 7 is prime.
  – So all we need to do is divide 7 by all numbers less than it but
    greater than one, and if any of them have no remainder, we
    know it’s not prime.
Flowcharts
• So,
• If the number is 7, as long as 6, 5, 4, 3, and
  2 give a remainder, 7 is prime.
• If the number is 9, we know that
  8, 7, 6, 5, and 4, all give remainders, but 3
  does not give a remainder, it goes evenly
  into 9 so we can say 9 is not prime
Flowcharts
• So remember,
  – if the number is 7, as long as 6, 5, 4, 3, and 2
    give a remainder, 7 is prime.
• So, in general,
  – if the number is A, as long as A-1, A-2, A-3, A-
    4, ... 2 give a remainder, A is prime.
START
START


Read in A
START


Read in A


B = A -1
START


Read in A


B = A -1




Is B = = 1?
START


     Read in A


     B = A -1



No
     Is B = = 1?
START


              Read in A


              B = A -1



       No
              Is B = = 1?


   Does
 A/B give a
remainder?
START


                    Read in A


                    B = A -1



             No
                    Is B = = 1?

Yes
         Does
       A/B give a
      remainder?
START


                      Read in A


                      B = A -1




B=B-1          No
                      Is B = = 1?

  Yes
           Does
         A/B give a
        remainder?
START


                      Read in A


                      B = A -1




B=B-1          No
                      Is B = = 1?

  Yes
           Does
         A/B give a
        remainder?
START


                            Read in A


                            B = A -1




B=B-1             No
                            Is B = = 1?

  Yes
             Does
           A/B give a
          remainder?

                No

        Print “Not Prime”
START


                            Read in A


                            B = A -1




B=B-1             No                      Yes
                            Is B = = 1?         Print “Prime”

  Yes
             Does
           A/B give a
          remainder?

                No

        Print “Not Prime”
START


                            Read in A


                            B = A -1




B=B-1             No                      Yes
                            Is B = = 1?         Print “Prime”

  Yes
             Does
           A/B give a
          remainder?

                No

        Print “Not Prime”



                               END
Symbols
Symbols
Symbols


 Terminal                Decision

Input/Output
Operation                Connector


  Process                  Module

More Related Content

What's hot

Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowchartsnicky_walters
 
Presentation on Logical Operators
Presentation on Logical OperatorsPresentation on Logical Operators
Presentation on Logical OperatorsSanjeev Budha
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingMuthu Vinayagam
 
Constants and variables in c programming
Constants and variables in c programmingConstants and variables in c programming
Constants and variables in c programmingChitrank Dixit
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSajib
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackSoumen Santra
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c languageshhanks
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compileradilmehmood93
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c languagetanmaymodi4
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Kmap..(karnaugh map)
Kmap..(karnaugh map)Kmap..(karnaugh map)
Kmap..(karnaugh map)Zain Jafri
 
Problem Solving and Python Programming
Problem Solving and Python ProgrammingProblem Solving and Python Programming
Problem Solving and Python ProgrammingMahaJeya
 
Register Reference Instructions | Computer Science
Register Reference Instructions | Computer ScienceRegister Reference Instructions | Computer Science
Register Reference Instructions | Computer ScienceTransweb Global Inc
 

What's hot (20)

Function in c
Function in cFunction in c
Function in c
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
 
Presentation on Logical Operators
Presentation on Logical OperatorsPresentation on Logical Operators
Presentation on Logical Operators
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
 
Constants and variables in c programming
Constants and variables in c programmingConstants and variables in c programming
Constants and variables in c programming
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c language
 
Simple Calculator Flowchart
Simple Calculator FlowchartSimple Calculator Flowchart
Simple Calculator Flowchart
 
structure of a c program
structure of a c programstructure of a c program
structure of a c program
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
notes about Arduino
notes about Arduinonotes about Arduino
notes about Arduino
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compiler
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Kmap..(karnaugh map)
Kmap..(karnaugh map)Kmap..(karnaugh map)
Kmap..(karnaugh map)
 
Problem Solving and Python Programming
Problem Solving and Python ProgrammingProblem Solving and Python Programming
Problem Solving and Python Programming
 
Register Reference Instructions | Computer Science
Register Reference Instructions | Computer ScienceRegister Reference Instructions | Computer Science
Register Reference Instructions | Computer Science
 
Programming in c
Programming in cProgramming in c
Programming in c
 

Viewers also liked

Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 
Computer Network Topologies (with animations)
Computer Network Topologies (with animations)Computer Network Topologies (with animations)
Computer Network Topologies (with animations)Damian T. Gordon
 
Ak different patterns in algorithms
Ak different patterns in algorithmsAk different patterns in algorithms
Ak different patterns in algorithmsAbhishek Kumar
 
Operating system 1
Operating system 1Operating system 1
Operating system 1edudivya
 
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...Blue Elephant Consulting
 
Journalistic principles and ethic questions exam-ethics_(l2)
Journalistic principles and ethic   questions exam-ethics_(l2)Journalistic principles and ethic   questions exam-ethics_(l2)
Journalistic principles and ethic questions exam-ethics_(l2)Chormvirak Moulsem
 
Journalistic principles and ethic questions exam-journalism_(l1)
Journalistic principles and ethic   questions exam-journalism_(l1)Journalistic principles and ethic   questions exam-journalism_(l1)
Journalistic principles and ethic questions exam-journalism_(l1)Chormvirak Moulsem
 
Computer programming language concept
Computer programming language conceptComputer programming language concept
Computer programming language conceptAfiq Sajuri
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-pptraj732723
 
The Do's and Don'ts of Journalism
The Do's and Don'ts of JournalismThe Do's and Don'ts of Journalism
The Do's and Don'ts of JournalismMelissa Merkler
 
memory management of windows vs linux
memory management of windows vs linuxmemory management of windows vs linux
memory management of windows vs linuxSumit Khanka
 
Memory Management in Windows 7
Memory Management in Windows 7Memory Management in Windows 7
Memory Management in Windows 7Naveed Qadri
 

Viewers also liked (20)

Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
C Language Unit-1
C Language Unit-1C Language Unit-1
C Language Unit-1
 
Classroom Decorum
Classroom DecorumClassroom Decorum
Classroom Decorum
 
Computer Network Topologies (with animations)
Computer Network Topologies (with animations)Computer Network Topologies (with animations)
Computer Network Topologies (with animations)
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Ak different patterns in algorithms
Ak different patterns in algorithmsAk different patterns in algorithms
Ak different patterns in algorithms
 
Operating system 1
Operating system 1Operating system 1
Operating system 1
 
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
An Introduction To Python - Problem Solving: Flowcharts & Test Cases, Boolean...
 
Unit 1 introduction to operating system
Unit 1 introduction to operating systemUnit 1 introduction to operating system
Unit 1 introduction to operating system
 
Journalistic principles and ethic questions exam-ethics_(l2)
Journalistic principles and ethic   questions exam-ethics_(l2)Journalistic principles and ethic   questions exam-ethics_(l2)
Journalistic principles and ethic questions exam-ethics_(l2)
 
Journalistic principles and ethic questions exam-journalism_(l1)
Journalistic principles and ethic   questions exam-journalism_(l1)Journalistic principles and ethic   questions exam-journalism_(l1)
Journalistic principles and ethic questions exam-journalism_(l1)
 
eLearning Research Trends
eLearning Research TrendseLearning Research Trends
eLearning Research Trends
 
Computer programming language concept
Computer programming language conceptComputer programming language concept
Computer programming language concept
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt
 
The Do's and Don'ts of Journalism
The Do's and Don'ts of JournalismThe Do's and Don'ts of Journalism
The Do's and Don'ts of Journalism
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 
memory management of windows vs linux
memory management of windows vs linuxmemory management of windows vs linux
memory management of windows vs linux
 
Memory Management in Windows 7
Memory Management in Windows 7Memory Management in Windows 7
Memory Management in Windows 7
 
Flowchart
FlowchartFlowchart
Flowchart
 

More from Damian T. Gordon

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Damian T. Gordon
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesDamian T. Gordon
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud ComputingDamian T. Gordon
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSDamian T. Gordon
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOTDamian T. Gordon
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricDamian T. Gordon
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDamian T. Gordon
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSUREDamian T. Gordon
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDamian T. Gordon
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDamian T. Gordon
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDamian T. Gordon
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsDamian T. Gordon
 

More from Damian T. Gordon (20)

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless Computing
 
Cloud Identity Management
Cloud Identity ManagementCloud Identity Management
Cloud Identity Management
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 
How to Argue Logically
How to Argue LogicallyHow to Argue Logically
How to Argue Logically
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONS
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOT
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson Rubric
 
Evaluating Teaching: LORI
Evaluating Teaching: LORIEvaluating Teaching: LORI
Evaluating Teaching: LORI
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause Procedure
 
Designing Teaching: ADDIE
Designing Teaching: ADDIEDesigning Teaching: ADDIE
Designing Teaching: ADDIE
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSURE
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning Types
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of Instruction
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration Theory
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some Considerations
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the lifeNitinDeodare
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024CapitolTechU
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Mark Carrigan
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIagpharmacy11
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfmstarkes24
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...Krashi Coaching
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 

Recently uploaded (20)

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdf
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 

Introduction to Flowcharts

  • 2. Introduction • We mentioned it already, that if we thing of an analyst as being analogous to an architect, and a developer as being analogous to a builder, then the most important thing we can do as analysts is to explain our designs to the developers in a simple and clear way. • How do architects do this?
  • 3.
  • 4. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and print it out.
  • 7. START Read in A Print A
  • 8. START Read in A Print A END
  • 9. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and print it out double the number.
  • 10. START
  • 15. START
  • 18. START Read in A B=A*2 can be B = A*2 read as “B gets the value of A multiplied by 2”
  • 19. START Read in A B = A*2 Print B
  • 20. START Read in A B = A*2 Print B END
  • 21. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number, check if it is odd or even.
  • 22. START
  • 24. START Read in A Does A/2 give a remainder?
  • 25. START Read in A Does A/2 Print “It’s Odd” Yes give a remainder?
  • 26. START Read in A Does A/2 No Print “It’s Odd” Yes Print “It’s Even” give a remainder?
  • 27. START Read in A Does A/2 No Print “It’s Odd” Yes Print “It’s Even” give a remainder? END
  • 28. Flowcharts • So let’s say we want to express the following algorithm to print out the bigger of two numbers: – Read in two numbers, call them A and B. Is A is bigger than B, print out A, otherwise print out B.
  • 29. START
  • 31. START Read in A and B A>B?
  • 32. START Read in A and B Print A Yes A>B?
  • 33. START Read in A and B Yes No Print A A>B? Print B
  • 34. START Read in A and B Yes No Print A A>B? Print B END
  • 35. Flowcharts • So let’s say we want to express the following algorithm to print out the bigger of three numbers: – Read in three numbers, call them A, B and C. • If A is bigger than B, then if A is bigger than C, print out A, otherwise print out C. • If B is bigger than A, then if B is bigger than C, print out B, otherwise print out C.
  • 36. START
  • 37. START Read in A, B and C
  • 38. START Read in A, B and C A>B?
  • 39. START Read in A, B and C Yes A>C? A>B?
  • 40. START Read in A, B and C Yes No A>C? A>B? B>C?
  • 41. START Read in A, B and C Yes No A>C? A>B? B>C? No No Print C
  • 42. START Read in A, B and C Yes Yes No A>C? A>B? B>C? No No Print A Print C
  • 43. START Read in A, B and C Yes Yes No Yes A>C? A>B? B>C? No No Print A Print C Print B
  • 44. START Read in A, B and C Yes Yes No Yes A>C? A>B? B>C? No No Print A Print C Print B END
  • 45. Flowcharts • So let’s say we want to express the following algorithm: – Print out the numbers from 1 to 5
  • 46. START
  • 51. START Print 1 Print 2 Print 3 Print 4 Print 5
  • 52. START Print 1 Print 2 Print 3 Print 4 Print 5 END
  • 54. Flowcharts A=A+1 • If I say A = A + 1, that means “A gets the value of whatever is in itself, plus 1” • If A is 14 • It becomes 15 14 +1 A (old) 15 A (new)
  • 55. START
  • 58. START A=1 No Is A==6? Print A
  • 59. START A=1 A=A+1 No Is A==6? Print A
  • 60. START A=1 A=A+1 No Is A==6? Print A
  • 61. START A=1 A=A+1 No Is A==6? Print A Yes END
  • 62. Flowcharts • So let’s say we want to express the following algorithm: – Add up the numbers 1 to 5
  • 63. Flowcharts T=5 • But first a few points; • If I say T = 5, that means “T gets the value 5”
  • 64. Flowcharts T=5 • But first a few points; • If I say T = 5, that means “T gets the value 5” T
  • 65. Flowcharts T=5 • But first a few points; • If I say T = 5, that means “T gets the value 5” 5 T
  • 66. Flowcharts T=X • If I say T = X, that means “T gets the value of whatever is in the variable X”
  • 67. Flowcharts T=X • If I say T = X, that means “T gets the value of whatever is in the variable X” • So if X is 14, then T will get the value 14.
  • 68. Flowcharts T=X • If I say T = X, that means “T gets the value of whatever is in the variable X” • So if X is 14, then T will get the value 14. 14 X 14 T
  • 69. Flowcharts T=X+1 • If I say T = X+1, that means “T gets the value of whatever is in the variable X plus one”
  • 70. Flowcharts T=X+1 • If I say T = X+1, that means “T gets the value of whatever is in the variable X plus one” • So if X is 14, T becomes 15, and X stays as 14.
  • 71. Flowcharts T=X+1 • If I say T = X+1, that means “T gets the value of whatever is in the variable X plus one” • So if X is 14, T becomes 15, and X stays as 14. +1 14 X 15 T
  • 72. Flowcharts T=T+X • If I say T = T + X, that means “T gets the value of whatever is in itself plus whatever is in the variable X”
  • 73. Flowcharts T=T+X • If I say T = T + X, that means “T gets the value of whatever is in itself plus whatever is in the variable X” • If T is 14 and X is 9 • T becomes 23 • X stays at 9
  • 74. Flowcharts T=T+X • If I say T = T + X, that means “T gets the value of whatever is in itself plus whatever is in the variable X” • If T is 14 and X is 9 • T becomes 23 14 9 • X stays at 9 T(old) X 23 T(new)
  • 75. Flowcharts • So let’s say we want to express the following algorithm: – Add up the numbers 1 to 5
  • 76. START
  • 79. START Total = 0 A=1 Is A==6?
  • 80. START Total = 0 A=1 No Is A==6? Total = Total + A;
  • 81. START Total = 0 A=1 A=A+1 No Is A==6? Total = Total + A;
  • 82. START Total = 0 A=1 A=A+1 No Is A==6? Total = Total + A; Yes END
  • 83. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number.
  • 84. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number. – What’s a prime number?
  • 85. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number. – What’s a prime number? – A number that’s only divisible by itself and 1, e.g. 7.
  • 86. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number. – What’s a prime number? – A number that’s only divisible by itself and 1, e.g. 7. – Or to put it another way, every number other than itself and 1 gives a remainder, e.g. For 7, if 6, 5, 4, 3, and 2 give a remainder then 7 is prime.
  • 87. Flowcharts • So let’s say we want to express the following algorithm: – Read in a number and check if it’s a prime number. – What’s a prime number? – A number that’s only divisible by itself and 1, e.g. 7. – Or to put it another way, every number other than itself and 1 gives a remainder, e.g. For 7, if 6, 5, 4, 3, and 2 give a remainder then 7 is prime. – So all we need to do is divide 7 by all numbers less than it but greater than one, and if any of them have no remainder, we know it’s not prime.
  • 88. Flowcharts • So, • If the number is 7, as long as 6, 5, 4, 3, and 2 give a remainder, 7 is prime. • If the number is 9, we know that 8, 7, 6, 5, and 4, all give remainders, but 3 does not give a remainder, it goes evenly into 9 so we can say 9 is not prime
  • 89. Flowcharts • So remember, – if the number is 7, as long as 6, 5, 4, 3, and 2 give a remainder, 7 is prime. • So, in general, – if the number is A, as long as A-1, A-2, A-3, A- 4, ... 2 give a remainder, A is prime.
  • 90. START
  • 93. START Read in A B = A -1 Is B = = 1?
  • 94. START Read in A B = A -1 No Is B = = 1?
  • 95. START Read in A B = A -1 No Is B = = 1? Does A/B give a remainder?
  • 96. START Read in A B = A -1 No Is B = = 1? Yes Does A/B give a remainder?
  • 97. START Read in A B = A -1 B=B-1 No Is B = = 1? Yes Does A/B give a remainder?
  • 98. START Read in A B = A -1 B=B-1 No Is B = = 1? Yes Does A/B give a remainder?
  • 99. START Read in A B = A -1 B=B-1 No Is B = = 1? Yes Does A/B give a remainder? No Print “Not Prime”
  • 100. START Read in A B = A -1 B=B-1 No Yes Is B = = 1? Print “Prime” Yes Does A/B give a remainder? No Print “Not Prime”
  • 101. START Read in A B = A -1 B=B-1 No Yes Is B = = 1? Print “Prime” Yes Does A/B give a remainder? No Print “Not Prime” END
  • 104. Symbols Terminal Decision Input/Output Operation Connector Process Module