SlideShare a Scribd company logo
1 of 19
For more updates join our newsletter at www.anjalitechnosoft.in
A
www.anjalitechnosoft.inwww.anjalitechnosoft.in
For more updates join our newsletter at www.anjalitechnosoft.in
Contents
• Algorithm
• Flowchart
• Pseudo codes
• Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
• A typical programming task can be divided into
two phases:
• Problem solving phase
– produce an ordered sequence of steps that describe
solution of problem
– this sequence of steps is called an algorithm
• Implementation phase
– implement the program in some programming
language
Introduction
For more updates join our newsletter at www.anjalitechnosoft.in4
• An algorithm is “a finite set of precise
instructions for performing a computation or
for solving a problem”
– A program is one type of algorithm
• All programs are algorithms
• Not all algorithms are programs!
– Directions to somebody’s house is an algorithm
– A recipe for cooking a cake is an algorithm
– The steps to compute the cosine of 90° is an
algorithm
What is an Algorithm
For more updates join our newsletter at www.anjalitechnosoft.in5
• Input: what the algorithm takes in as input
• Output: what the algorithm produces as output
• Definiteness: the steps are defined precisely
• Correctness: should produce the correct output
• Finiteness: the steps required should be finite
• Effectiveness: each step must be able to be
performed in a finite amount of time
• Generality: the algorithm should be applicable
to all problems of a similar form
Properties of Algorithm
For more updates join our newsletter at www.anjalitechnosoft.in
• First produce a general algorithm (one can use
pseudocode)
• Refine the algorithm successively to get step by
step detailed algorithm that is very close to a
computer language.
• Pseudocode is an artificial and informal
language that helps programmers develop
algorithms. Pseudocode is very similar to
everyday English.
Steps in Problem Solving
For more updates join our newsletter at www.anjalitechnosoft.in
Write an algorithm to determine a student’s final
grade and indicate whether it is passing or failing.
The final grade is calculated as the average of four
marks.
Example
Pseudocode:
• Input a set of 4 marks
• Calculate their average by summing and dividing by 4
• if average is below 50
Print “FAIL”
else
Print “PASS”
For more updates join our newsletter at www.anjalitechnosoft.in
• Detailed Algorithm
• Step 1: Input M1,M2,M3,M4
Step 2: GRADE ← (M1+M2+M3+M4)/4
Step 3: if (GRADE < 50) then
Print “FAIL”
else
Print “PASS”
endif
Example..
For more updates join our newsletter at www.anjalitechnosoft.in
• (Dictionary) A schematic representation of a sequence
of operations, as in a manufacturing process or
computer program.
• (Technical) A graphical representation of the sequence
of operations in an information system or program.
Information system flowcharts show how data flows
from source documents through the computer to final
distribution to users. Program flowcharts show the
sequence of instructions in a single program or
subroutine. Different symbols are used to draw each
type of flowchart.
Flowchart
For more updates join our newsletter at www.anjalitechnosoft.in
Flowchart..
A Flowchart
– shows logic of an algorithm
– emphasizes individual steps and their
interconnections
– e.g. control flow from one action to the next
For more updates join our newsletter at www.anjalitechnosoft.in
Flowchart Symbols
For more updates join our newsletter at www.anjalitechnosoft.in
Step 1:
Input M1,M2,M3,M4
Step 2:
GRADE ← (M1+M2+M3+M4)/4
Step 3:
if (GRADE <50)
then
Print “FAIL”
else
Print “PASS”
endif
PRINT
“PASS”
START
Input
M1,M2,M3,M4
GRADE←(M1+M2+M3+M4)/4
IS
GRADE<5
0
PRINT
“FAIL”
STOP
YN
Example
For more updates join our newsletter at www.anjalitechnosoft.in
• A matrix representation of the logic of a decision
• Specifies the possible conditions and the resulting
actions
• Best used for complicated decision logic
Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
• A matrix representation of the logic of a decision
• Specifies the possible conditions and the resulting
actions
• Best used for complicated decision logic
Decision Table ..
For more updates join our newsletter at www.anjalitechnosoft.in
• Consists of three parts
– Condition stubs
• Lists condition relevant to decision
– Action stubs
• Actions that result from a given set of conditions
– Rules
• Specify which actions are to be followed for a given
set of conditions
For more updates join our newsletter at www.anjalitechnosoft.in
• Indifferent Condition
– Condition whose value does not affect which action is taken
for two or more rules
• Standard procedure for creating decision tables
– Name the condition and values each condition can assume
– Name all possible actions that can occur
– List all rules
– Define the actions for each rule
– Simplify the table
For more updates join our newsletter at www.anjalitechnosoft.in
9.17
For more updates join our newsletter at www.anjalitechnosoft.in
• PART 1. FRAME THE PROBLEM.
– Identify the conditions (decision criteria). These are the factors that will influence the
decision.
• E.g., We want to know the total cost of a student’s tuition. What factors are important?
– Identify the range of values for each condition or criteria.
• E.g. What are they for each factor identified above?
– Identify all possible actions that can occur.
• E.g. What types of calculations would be necessary?
• PART 2. CREATE THE TABLE.
– Create a table with 4 quadrants.
• Put the conditions in the upper left quadrant. One row per condition.
• Put the actions in the lower left quadrant. One row per action.
– List all possible rules.
• Alternate values for first condition. Repeat for all values of second condition. Keep repeating
this process for all conditions.
• Put the rules in the upper right quadrant.
– Enter actions for each rule
• In the lower right quadrant, determine what, if any, appropriate actions should be taken for
each rule.
– Reduce table as necessary.
Construction a Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
For any enquiry, post your doubt at
Anjali Technosoft
@ Clear your Doubts
For any enquiry, post your doubt at
Anjali Technosoft
@ Clear your Doubts

More Related Content

What's hot

A presentation on software crisis
A presentation on software crisisA presentation on software crisis
A presentation on software crisischandan sharma
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Software Engineering - Ch1
Software Engineering - Ch1Software Engineering - Ch1
Software Engineering - Ch1Siddharth Ayer
 
7 expressions and assignment statements
7 expressions and assignment statements7 expressions and assignment statements
7 expressions and assignment statementsMunawar Ahmed
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithmrajkumar1631010038
 
Python PPT
Python PPTPython PPT
Python PPTEdureka!
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming LanguageAhmad Idrees
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsYash Gupta
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineeringkirupasuchi1996
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design PresentationKawsar Ahmed
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.netJaya Kumari
 

What's hot (20)

A presentation on software crisis
A presentation on software crisisA presentation on software crisis
A presentation on software crisis
 
Software process
Software processSoftware process
Software process
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Software Engineering - Ch1
Software Engineering - Ch1Software Engineering - Ch1
Software Engineering - Ch1
 
7 expressions and assignment statements
7 expressions and assignment statements7 expressions and assignment statements
7 expressions and assignment statements
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Python PPT
Python PPTPython PPT
Python PPT
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineering
 
Algorithm Design Presentation
Algorithm Design PresentationAlgorithm Design Presentation
Algorithm Design Presentation
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
 
Python
PythonPython
Python
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 

Similar to Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table

C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESHarshJha34
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)praveena p
 
Unit 2 - Complete (1).pptx
Unit 2 - Complete (1).pptxUnit 2 - Complete (1).pptx
Unit 2 - Complete (1).pptxgogulram2
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptxssuser586772
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3REHAN IJAZ
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sitSaurabh846965
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxEyasu46
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptxTadiwaMawere
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem slovingMani Kandan
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life CycleFrankie Jones
 
Excel VBA.pptx
Excel VBA.pptxExcel VBA.pptx
Excel VBA.pptxGiyaShefin
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptxChaya64047
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing TechniquesAppili Vamsi Krishna
 
Lesson 1 of c programming algorithms and flowcharts.pptx
Lesson 1 of c programming algorithms and flowcharts.pptxLesson 1 of c programming algorithms and flowcharts.pptx
Lesson 1 of c programming algorithms and flowcharts.pptxAlinaMishra7
 

Similar to Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table (20)

C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
Algorithms - Introduction to computer programming
Algorithms - Introduction to computer programmingAlgorithms - Introduction to computer programming
Algorithms - Introduction to computer programming
 
Unit 2 - Complete (1).pptx
Unit 2 - Complete (1).pptxUnit 2 - Complete (1).pptx
Unit 2 - Complete (1).pptx
 
01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
 
Flowcharting week 5 2019 2020
Flowcharting week 5  2019  2020Flowcharting week 5  2019  2020
Flowcharting week 5 2019 2020
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
Fundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptxFundamentals of Programming Lecture #1.pptx
Fundamentals of Programming Lecture #1.pptx
 
Flow charts week 5 2020 2021
Flow charts week 5 2020  2021Flow charts week 5 2020  2021
Flow charts week 5 2020 2021
 
PROBLEM SOLVING.pptx
PROBLEM SOLVING.pptxPROBLEM SOLVING.pptx
PROBLEM SOLVING.pptx
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptx
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle
 
PPS_Unit 1.pptx
PPS_Unit 1.pptxPPS_Unit 1.pptx
PPS_Unit 1.pptx
 
Excel VBA.pptx
Excel VBA.pptxExcel VBA.pptx
Excel VBA.pptx
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Lesson 1 of c programming algorithms and flowcharts.pptx
Lesson 1 of c programming algorithms and flowcharts.pptxLesson 1 of c programming algorithms and flowcharts.pptx
Lesson 1 of c programming algorithms and flowcharts.pptx
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table

  • 1. For more updates join our newsletter at www.anjalitechnosoft.in A www.anjalitechnosoft.inwww.anjalitechnosoft.in
  • 2. For more updates join our newsletter at www.anjalitechnosoft.in Contents • Algorithm • Flowchart • Pseudo codes • Decision Table
  • 3. For more updates join our newsletter at www.anjalitechnosoft.in • A typical programming task can be divided into two phases: • Problem solving phase – produce an ordered sequence of steps that describe solution of problem – this sequence of steps is called an algorithm • Implementation phase – implement the program in some programming language Introduction
  • 4. For more updates join our newsletter at www.anjalitechnosoft.in4 • An algorithm is “a finite set of precise instructions for performing a computation or for solving a problem” – A program is one type of algorithm • All programs are algorithms • Not all algorithms are programs! – Directions to somebody’s house is an algorithm – A recipe for cooking a cake is an algorithm – The steps to compute the cosine of 90° is an algorithm What is an Algorithm
  • 5. For more updates join our newsletter at www.anjalitechnosoft.in5 • Input: what the algorithm takes in as input • Output: what the algorithm produces as output • Definiteness: the steps are defined precisely • Correctness: should produce the correct output • Finiteness: the steps required should be finite • Effectiveness: each step must be able to be performed in a finite amount of time • Generality: the algorithm should be applicable to all problems of a similar form Properties of Algorithm
  • 6. For more updates join our newsletter at www.anjalitechnosoft.in • First produce a general algorithm (one can use pseudocode) • Refine the algorithm successively to get step by step detailed algorithm that is very close to a computer language. • Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is very similar to everyday English. Steps in Problem Solving
  • 7. For more updates join our newsletter at www.anjalitechnosoft.in Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks. Example Pseudocode: • Input a set of 4 marks • Calculate their average by summing and dividing by 4 • if average is below 50 Print “FAIL” else Print “PASS”
  • 8. For more updates join our newsletter at www.anjalitechnosoft.in • Detailed Algorithm • Step 1: Input M1,M2,M3,M4 Step 2: GRADE ← (M1+M2+M3+M4)/4 Step 3: if (GRADE < 50) then Print “FAIL” else Print “PASS” endif Example..
  • 9. For more updates join our newsletter at www.anjalitechnosoft.in • (Dictionary) A schematic representation of a sequence of operations, as in a manufacturing process or computer program. • (Technical) A graphical representation of the sequence of operations in an information system or program. Information system flowcharts show how data flows from source documents through the computer to final distribution to users. Program flowcharts show the sequence of instructions in a single program or subroutine. Different symbols are used to draw each type of flowchart. Flowchart
  • 10. For more updates join our newsletter at www.anjalitechnosoft.in Flowchart.. A Flowchart – shows logic of an algorithm – emphasizes individual steps and their interconnections – e.g. control flow from one action to the next
  • 11. For more updates join our newsletter at www.anjalitechnosoft.in Flowchart Symbols
  • 12. For more updates join our newsletter at www.anjalitechnosoft.in Step 1: Input M1,M2,M3,M4 Step 2: GRADE ← (M1+M2+M3+M4)/4 Step 3: if (GRADE <50) then Print “FAIL” else Print “PASS” endif PRINT “PASS” START Input M1,M2,M3,M4 GRADE←(M1+M2+M3+M4)/4 IS GRADE<5 0 PRINT “FAIL” STOP YN Example
  • 13. For more updates join our newsletter at www.anjalitechnosoft.in • A matrix representation of the logic of a decision • Specifies the possible conditions and the resulting actions • Best used for complicated decision logic Decision Table
  • 14. For more updates join our newsletter at www.anjalitechnosoft.in • A matrix representation of the logic of a decision • Specifies the possible conditions and the resulting actions • Best used for complicated decision logic Decision Table ..
  • 15. For more updates join our newsletter at www.anjalitechnosoft.in • Consists of three parts – Condition stubs • Lists condition relevant to decision – Action stubs • Actions that result from a given set of conditions – Rules • Specify which actions are to be followed for a given set of conditions
  • 16. For more updates join our newsletter at www.anjalitechnosoft.in • Indifferent Condition – Condition whose value does not affect which action is taken for two or more rules • Standard procedure for creating decision tables – Name the condition and values each condition can assume – Name all possible actions that can occur – List all rules – Define the actions for each rule – Simplify the table
  • 17. For more updates join our newsletter at www.anjalitechnosoft.in 9.17
  • 18. For more updates join our newsletter at www.anjalitechnosoft.in • PART 1. FRAME THE PROBLEM. – Identify the conditions (decision criteria). These are the factors that will influence the decision. • E.g., We want to know the total cost of a student’s tuition. What factors are important? – Identify the range of values for each condition or criteria. • E.g. What are they for each factor identified above? – Identify all possible actions that can occur. • E.g. What types of calculations would be necessary? • PART 2. CREATE THE TABLE. – Create a table with 4 quadrants. • Put the conditions in the upper left quadrant. One row per condition. • Put the actions in the lower left quadrant. One row per action. – List all possible rules. • Alternate values for first condition. Repeat for all values of second condition. Keep repeating this process for all conditions. • Put the rules in the upper right quadrant. – Enter actions for each rule • In the lower right quadrant, determine what, if any, appropriate actions should be taken for each rule. – Reduce table as necessary. Construction a Decision Table
  • 19. For more updates join our newsletter at www.anjalitechnosoft.in For any enquiry, post your doubt at Anjali Technosoft @ Clear your Doubts For any enquiry, post your doubt at Anjali Technosoft @ Clear your Doubts