Introduction to computer science

INTRODUCTION TOCOMPUTER SCIENCE
CSC 1302
LECTURE 5
Department of Maths and Computer-
Science
Faculty of Natural and Applied Science
BY
UMAR DANJUMA MAIWADA
OBJECTIVES
 Solving problem with computer
 Algorithm
 Flow chart
2
SOLVING PROBLEMS WITH COMPUTER
 Computer works by obeying a sequence of
instructions, which constitutes a program.
 To solve a problem with computer, there
must be a program to solve it.
 A program needs careful planning, good
organization.
 A problem can be solved by writing a
program in one of many programming
languages, such as C++, Java, Pascal, and
Python.
3
TO SOLVE A PROBLEM USING A COMPUTER
 The following are needed:
 Clear idea
 Know input
 Know output
 Know strategy (program)
4
DATA
PROGRA
M
RESUL
T
STEPS INVOLVED IN SOLVING A PROBLEM
 Understand the problem.
 Breaking the problem into manageable pieces.
 Designing a solution.
 Considering alternatives to the solution and refining
the solution.
 Implementing the solution.
 Testing the solution and fixing any problems that
exist.
5
PROGRAM DEVELOPMENT CYCLE
 Analyse: Define the problem - Have a clear idea of
what data (or input) are given and the relationship
between the input and the desired output.
 Design: Plan the solution to the problem - logical
sequence of precise steps that solve the problem.
Such a sequence of steps is called an algorithm.
 Choose the interface: Select the objects - how the
input will be obtained and how the output will be
displayed. Then create objects to receive the input
and display the output.
 Code: Translate the algorithm into a programming
language - Coding is the technical word for writing
the program. During this stage, the program is written
in programming language of choice and entered into
6
7
o Test and debug: Locate and remove any errors
in the program - Testing is the process of finding
errors in a program, and debugging is the
process of correcting errors that are found.
many errors occurring due to typing mistakes,
flaws in the algorithm, or incorrect usages of the
programming language rules only can be
uncovered and corrected by careful detective
work.
o Complete the documentation: Organize all the
material that describes the program -
Documentation is intended to allow another
person or the programmer at a later date, to
understand the program. Internal documentation
consists of statements in the program that are
not executed, but point out the purposes of
various parts of the program.
ALGORITHMS
 Algorithm is a set of instructions which is taken in
order to lead to a solution.
 Algorithm consist of a sequence of operation for the
particular solution of the stated problem.
 It does not have to be written in computer
language.
 Algorithms have a definite beginning and a definite
end, and a finite number of steps.
PROPERTIES OF ALGORITHM
 Must be able to determine after a finite number of
steps e.g listing all counting numbers is not an
algorithm
 The steps must be clearly stated
 The input (Data) must be clear and well defined
 Given correct input, the algorithm must give correct
output (GIGO).
 An algorithm must be efficient in terms of time
consumption and computer memory space.
9
HOW TO DEVELOP A PROGRAM
 Problem formulation
 Design the algorithm
 Converting the algorithm into computer program
 Debugging and testing of the program
10
QUALITIES OF A GOOD ALGORITHM
 Inputs and outputs should be defined precisely.
 Each steps in algorithm should be clear and
unambiguous.
 Algorithm should be most effective among many
different ways to solve a problem.
 An algorithm shouldn't have computer code.
Instead, the algorithm should be written in such a
way that, it can be used in similar programming
languages
11
EXAMPLE OF A SIMPLE ADDITION ALGORITHM
 Step 1: Start
 Step 2: Declare variables num1, num2 and sum.
 Step 3: Read values num1 and num2.
 Step 4: Add num1 and num2 and assign the result
to sum.
 sum←num1+num2
 Step 5: Display sum
 Step 6: Stop
12
GIVEN VALUES OF THE VARIABLE P, Q, R,
COMPUTE THE VALUE OF H=6P+8Q-R THEN
WRITE ALGORITHM
 Get values of p, q, and r
 Compute H=6.p+8.q-r
 Report the resulting value of H
 End
13
WRITE THE ALGORITHM FOR THE PROGRAM WHEN TAKES IN VALUES
OF A, B, C, D, E AND Y AND COMPUTE X= A.Y.Y.Y.Y + B.Y.Y.Y +
C.Y.Y.D.Y+E
 Get values of A, B, C, D, E, Y
 Compute X=A.Y.Y.Y.Y+B.Y.Y.Y+C.Y.Y-D.Y+E
 Report the resulting value of X
 End
14
FLOW CHART
 Flow chart is a diagrammatic representation of an
algorithm or a program.
 A flow chart is a type of diagram representing a
process using different symbols containing
information about steps or a sequence of events.
 Flowcharts are helpful for:
 Aiding understanding of relationships among different
process steps
 Collecting data about a particular process
 Helping with decision making
 Measuring the performance of a process
 Depicting the structure of a process
 Tracking the process flow
 Highlighting important steps and eliminating the
unnecessary steps
 A flowchart consists of special geometric symbols
15
16
The main advantage of using a flowchart
to plan a task is that it provides a pictorial
representation of the task, which makes
the logic easier to follow. We can clearly
see every step and how each step is
connected to the next.
The major disadvantage with flowcharts
is that when a program is very large, the
flowcharts may continue for many pages,
making them difficult to follow and modify.
A TABLE OF THE FLOWCHART SYMBOLS ADOPTED BY THE
AMERICAN NATIONAL STANDARDS INSTITUTE (ANSI)
FOLLOWS.
17
18
GENERAL RULES FOR FLOW CHARTING
 1. All boxes of the flowchart are connected with Arrows. (Not
lines)
 2. Flowchart symbols have an entry point on the top of the
symbol with no other entry points. The exit point for all
flowchart symbols is on the bottom except for the Decision
symbol.
 3. The Decision symbol has two exit points; these can be on
the sides or the bottom and one side.
 4. Generally a flowchart will flow from top to bottom. However,
an upward flow can be shown as long as it does not exceed 3
symbols.
 5. Connectors are used to connect breaks in the flowchart.
Examples are:
 • From one page to another page.
 • From the bottom of the page to the top of the same page.
 • An upward flow of more than 3 symbols
 6. Subroutines and Interrupt programs have their own and
independent flowcharts.
19
EXAMPLES
1. Draw a flow chart of y=3x+5
20
START
READ X
Y=3X+5
WRITE
Y
STOP
21
2. Draw the flow chart of the program which computes Z=2y+3x+3
START
READ
X,Y
Z=2y+3X+3
WRITE
Z
STOP
22
3. Draw the flow chart of the program which computes the gradient of the line
joining (x1, y1) and (x2, y2)
START
READ
X1,Y1, X2,
Y2
U=(Y2-Y1)/(X2-X1)
WRITE U
STOP
PSEUDOCODE
 Pseudocode is an abbreviated version of actual
computer code (hence, pseudocode). The
geometric symbols used in flowcharts are replaced
by English-like statements that outline the process.
 Pseudocode allows the programmer to focus on the
steps required to solve a problem rather than on
how to use the computer language.
 Pseudocode has several advantages. It is compact
and probably will not extend for many pages as
flowcharts commonly do.
23
PROGRAMMING TOOLS
 A programming tool may be any software program
or utility that aids software developers or
programmers in creating, editing, debugging,
maintaining and/or performing any programming or
development-specific task.
 Programming tools were initially designed to
support or complement programming languages by
providing the functionality and features these
languages did not have.
 Compilers, linkers, assemblers, disassemblers,
load testers, performance analysts, GUI
development tools and code editors are also all
forms of programming tools.
24
QUESTIONS???
THANK YOU FOR YOUR ATTENTION
25
1 de 25

Recomendados

POLITEKNIK MALAYSIA por
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
1.4K vistas22 diapositivas
Programming flowcharts for C Language por
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C LanguageAryan Ajmer
44.1K vistas22 diapositivas
Introduction to problem solving in c++ por
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++Online
15.6K vistas45 diapositivas
FIT-Unit3 chapter 1 -computer program por
FIT-Unit3 chapter 1 -computer programFIT-Unit3 chapter 1 -computer program
FIT-Unit3 chapter 1 -computer programraksharao
468 vistas24 diapositivas
Flowchart and algorithm por
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithmDHANIK VIKRANT
731 vistas28 diapositivas
Problem solving (C++ Programming) por
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)Umair Younas
6K vistas30 diapositivas

Más contenido relacionado

La actualidad más candente

Programming process and flowchart por
Programming process and flowchartProgramming process and flowchart
Programming process and flowcharthermiraguilar
9.6K vistas34 diapositivas
Introduction to flowchart por
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
70.7K vistas34 diapositivas
Pseudocode-Flowchart por
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
38.5K vistas14 diapositivas
Flowchart - Introduction and Designing Tools por
Flowchart - Introduction and Designing ToolsFlowchart - Introduction and Designing Tools
Flowchart - Introduction and Designing ToolsJawad Khan
1.3K vistas33 diapositivas
Introduction to algorithms por
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithmsMadishetty Prathibha
297 vistas26 diapositivas
Flow chart programming por
Flow chart programmingFlow chart programming
Flow chart programmingTearsome Llantada
12.4K vistas63 diapositivas

La actualidad más candente(20)

Programming process and flowchart por hermiraguilar
Programming process and flowchartProgramming process and flowchart
Programming process and flowchart
hermiraguilar9.6K vistas
Introduction to flowchart por Jordan Delacruz
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
Jordan Delacruz70.7K vistas
Pseudocode-Flowchart por lotlot
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
lotlot38.5K vistas
Flowchart - Introduction and Designing Tools por Jawad Khan
Flowchart - Introduction and Designing ToolsFlowchart - Introduction and Designing Tools
Flowchart - Introduction and Designing Tools
Jawad Khan1.3K vistas
algo por Rao Khan
algoalgo
algo
Rao Khan1.5K vistas
Algorithm and flowchart por Shivam Sharma
Algorithm and flowchart Algorithm and flowchart
Algorithm and flowchart
Shivam Sharma168 vistas
4 coding from algorithms por hccit
4 coding from algorithms4 coding from algorithms
4 coding from algorithms
hccit12K vistas
Software develop.... por GCWUS
Software develop.... Software develop....
Software develop....
GCWUS412 vistas
Chap3 flow charts por amit139
Chap3 flow chartsChap3 flow charts
Chap3 flow charts
amit13922.3K vistas
Computer programming:Know How to Flowchart por Angelo Tomboc
Computer  programming:Know How to FlowchartComputer  programming:Know How to Flowchart
Computer programming:Know How to Flowchart
Angelo Tomboc17K vistas
Algorithm and c language por kamalbeydoun
Algorithm and c languageAlgorithm and c language
Algorithm and c language
kamalbeydoun1.3K vistas
Pseudocode algorithim flowchart por fika sweety
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
fika sweety7.9K vistas
Algorithms por Liam Dunphy
AlgorithmsAlgorithms
Algorithms
Liam Dunphy48.9K vistas

Similar a Introduction to computer science

PCCF UNIT 1.pptx por
PCCF UNIT 1.pptxPCCF UNIT 1.pptx
PCCF UNIT 1.pptxDivyaKS12
14 vistas61 diapositivas
Unit 1 python (2021 r) por
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)praveena p
525 vistas105 diapositivas
3 algorithm-and-flowchart por
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchartRohit Shrivastava
15.1K vistas37 diapositivas
Problem solving methodology por
Problem solving methodologyProblem solving methodology
Problem solving methodologyProf. Dr. K. Adisesha
850 vistas12 diapositivas
Flowcharting and Algorithm por
Flowcharting and Algorithm Flowcharting and Algorithm
Flowcharting and Algorithm Zeinna Belle Desamito
855 vistas23 diapositivas
AlgorithmAndFlowChart.pdf por
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfSusieMaestre1
111 vistas29 diapositivas

Similar a Introduction to computer science(20)

PCCF UNIT 1.pptx por DivyaKS12
PCCF UNIT 1.pptxPCCF UNIT 1.pptx
PCCF UNIT 1.pptx
DivyaKS1214 vistas
Unit 1 python (2021 r) por praveena p
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
praveena p525 vistas
AlgorithmAndFlowChart.pdf por SusieMaestre1
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
SusieMaestre1111 vistas
What is algorithm por mshoaib15
What is algorithmWhat is algorithm
What is algorithm
mshoaib1580 vistas
Algorithm and flowchart por Sachin Goyani
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Sachin Goyani7.1K vistas
C++ ppt por parpan34
C++ pptC++ ppt
C++ ppt
parpan3445.7K vistas
program development and paradigms por kasenerd
program development and paradigmsprogram development and paradigms
program development and paradigms
kasenerd710 vistas
Algorithm and flowchart2010 por Jordan Delacruz
Algorithm and flowchart2010Algorithm and flowchart2010
Algorithm and flowchart2010
Jordan Delacruz22.5K vistas
Fundamentals of programming with C++ por Seble Nigussie
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
Seble Nigussie244 vistas
L1. Basic Programming Concepts.pdf por MMRF2
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF28 vistas

Más de umardanjumamaiwada

Seminar Information Protection & Computer Security (Cryptography).pptx por
Seminar Information Protection & Computer Security  (Cryptography).pptxSeminar Information Protection & Computer Security  (Cryptography).pptx
Seminar Information Protection & Computer Security (Cryptography).pptxumardanjumamaiwada
5 vistas23 diapositivas
Oop using JAVA por
Oop using JAVAOop using JAVA
Oop using JAVAumardanjumamaiwada
455 vistas34 diapositivas
C++ por
C++ C++
C++ umardanjumamaiwada
114 vistas29 diapositivas
Computer hardware por
Computer hardware Computer hardware
Computer hardware umardanjumamaiwada
130 vistas20 diapositivas
2javascript web programming with JAVA script por
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA scriptumardanjumamaiwada
461 vistas26 diapositivas
1 web programming por
1 web programming1 web programming
1 web programmingumardanjumamaiwada
454 vistas33 diapositivas

Más de umardanjumamaiwada(20)

Seminar Information Protection & Computer Security (Cryptography).pptx por umardanjumamaiwada
Seminar Information Protection & Computer Security  (Cryptography).pptxSeminar Information Protection & Computer Security  (Cryptography).pptx
Seminar Information Protection & Computer Security (Cryptography).pptx
2javascript web programming with JAVA script por umardanjumamaiwada
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
umardanjumamaiwada461 vistas

Último

EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN... por
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...gynomark
9 vistas15 diapositivas
Batrachospermum.pptx por
Batrachospermum.pptxBatrachospermum.pptx
Batrachospermum.pptxnisarahmad632316
20 vistas37 diapositivas
MSC III_Advance Forensic Serology_Final.pptx por
MSC III_Advance Forensic Serology_Final.pptxMSC III_Advance Forensic Serology_Final.pptx
MSC III_Advance Forensic Serology_Final.pptxSuchita Rawat
10 vistas109 diapositivas
CSF -SHEEBA.D presentation.pptx por
CSF -SHEEBA.D presentation.pptxCSF -SHEEBA.D presentation.pptx
CSF -SHEEBA.D presentation.pptxSheebaD7
10 vistas13 diapositivas
Matthias Beller ChemAI 231116.pptx por
Matthias Beller ChemAI 231116.pptxMatthias Beller ChemAI 231116.pptx
Matthias Beller ChemAI 231116.pptxMarco Tibaldi
82 vistas29 diapositivas
Company Fashion Show ChemAI 231116.pptx por
Company Fashion Show ChemAI 231116.pptxCompany Fashion Show ChemAI 231116.pptx
Company Fashion Show ChemAI 231116.pptxMarco Tibaldi
69 vistas30 diapositivas

Último(20)

EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN... por gynomark
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
gynomark9 vistas
MSC III_Advance Forensic Serology_Final.pptx por Suchita Rawat
MSC III_Advance Forensic Serology_Final.pptxMSC III_Advance Forensic Serology_Final.pptx
MSC III_Advance Forensic Serology_Final.pptx
Suchita Rawat10 vistas
CSF -SHEEBA.D presentation.pptx por SheebaD7
CSF -SHEEBA.D presentation.pptxCSF -SHEEBA.D presentation.pptx
CSF -SHEEBA.D presentation.pptx
SheebaD710 vistas
Matthias Beller ChemAI 231116.pptx por Marco Tibaldi
Matthias Beller ChemAI 231116.pptxMatthias Beller ChemAI 231116.pptx
Matthias Beller ChemAI 231116.pptx
Marco Tibaldi82 vistas
Company Fashion Show ChemAI 231116.pptx por Marco Tibaldi
Company Fashion Show ChemAI 231116.pptxCompany Fashion Show ChemAI 231116.pptx
Company Fashion Show ChemAI 231116.pptx
Marco Tibaldi69 vistas
RemeOs science and clinical evidence por PetrusViitanen1
RemeOs science and clinical evidenceRemeOs science and clinical evidence
RemeOs science and clinical evidence
PetrusViitanen114 vistas
How to be(come) a successful PhD student por Tom Mens
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens374 vistas
Synthesis and Characterization of Magnetite-Magnesium Sulphate-Sodium Dodecyl... por GIFT KIISI NKIN
Synthesis and Characterization of Magnetite-Magnesium Sulphate-Sodium Dodecyl...Synthesis and Characterization of Magnetite-Magnesium Sulphate-Sodium Dodecyl...
Synthesis and Characterization of Magnetite-Magnesium Sulphate-Sodium Dodecyl...
GIFT KIISI NKIN12 vistas
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx por MN
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptxENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
MN6 vistas
Workshop Chemical Robotics ChemAI 231116.pptx por Marco Tibaldi
Workshop Chemical Robotics ChemAI 231116.pptxWorkshop Chemical Robotics ChemAI 231116.pptx
Workshop Chemical Robotics ChemAI 231116.pptx
Marco Tibaldi90 vistas
"How can I develop my learning path in bioinformatics? por Bioinformy
"How can I develop my learning path in bioinformatics?"How can I develop my learning path in bioinformatics?
"How can I develop my learning path in bioinformatics?
Bioinformy17 vistas
Guinea Pig as a Model for Translation Research por PervaizDar1
Guinea Pig as a Model for Translation ResearchGuinea Pig as a Model for Translation Research
Guinea Pig as a Model for Translation Research
PervaizDar111 vistas
Workshop LLM Life Sciences ChemAI 231116.pptx por Marco Tibaldi
Workshop LLM Life Sciences ChemAI 231116.pptxWorkshop LLM Life Sciences ChemAI 231116.pptx
Workshop LLM Life Sciences ChemAI 231116.pptx
Marco Tibaldi96 vistas

Introduction to computer science

  • 1. INTRODUCTION TOCOMPUTER SCIENCE CSC 1302 LECTURE 5 Department of Maths and Computer- Science Faculty of Natural and Applied Science BY UMAR DANJUMA MAIWADA
  • 2. OBJECTIVES  Solving problem with computer  Algorithm  Flow chart 2
  • 3. SOLVING PROBLEMS WITH COMPUTER  Computer works by obeying a sequence of instructions, which constitutes a program.  To solve a problem with computer, there must be a program to solve it.  A program needs careful planning, good organization.  A problem can be solved by writing a program in one of many programming languages, such as C++, Java, Pascal, and Python. 3
  • 4. TO SOLVE A PROBLEM USING A COMPUTER  The following are needed:  Clear idea  Know input  Know output  Know strategy (program) 4 DATA PROGRA M RESUL T
  • 5. STEPS INVOLVED IN SOLVING A PROBLEM  Understand the problem.  Breaking the problem into manageable pieces.  Designing a solution.  Considering alternatives to the solution and refining the solution.  Implementing the solution.  Testing the solution and fixing any problems that exist. 5
  • 6. PROGRAM DEVELOPMENT CYCLE  Analyse: Define the problem - Have a clear idea of what data (or input) are given and the relationship between the input and the desired output.  Design: Plan the solution to the problem - logical sequence of precise steps that solve the problem. Such a sequence of steps is called an algorithm.  Choose the interface: Select the objects - how the input will be obtained and how the output will be displayed. Then create objects to receive the input and display the output.  Code: Translate the algorithm into a programming language - Coding is the technical word for writing the program. During this stage, the program is written in programming language of choice and entered into 6
  • 7. 7 o Test and debug: Locate and remove any errors in the program - Testing is the process of finding errors in a program, and debugging is the process of correcting errors that are found. many errors occurring due to typing mistakes, flaws in the algorithm, or incorrect usages of the programming language rules only can be uncovered and corrected by careful detective work. o Complete the documentation: Organize all the material that describes the program - Documentation is intended to allow another person or the programmer at a later date, to understand the program. Internal documentation consists of statements in the program that are not executed, but point out the purposes of various parts of the program.
  • 8. ALGORITHMS  Algorithm is a set of instructions which is taken in order to lead to a solution.  Algorithm consist of a sequence of operation for the particular solution of the stated problem.  It does not have to be written in computer language.  Algorithms have a definite beginning and a definite end, and a finite number of steps.
  • 9. PROPERTIES OF ALGORITHM  Must be able to determine after a finite number of steps e.g listing all counting numbers is not an algorithm  The steps must be clearly stated  The input (Data) must be clear and well defined  Given correct input, the algorithm must give correct output (GIGO).  An algorithm must be efficient in terms of time consumption and computer memory space. 9
  • 10. HOW TO DEVELOP A PROGRAM  Problem formulation  Design the algorithm  Converting the algorithm into computer program  Debugging and testing of the program 10
  • 11. QUALITIES OF A GOOD ALGORITHM  Inputs and outputs should be defined precisely.  Each steps in algorithm should be clear and unambiguous.  Algorithm should be most effective among many different ways to solve a problem.  An algorithm shouldn't have computer code. Instead, the algorithm should be written in such a way that, it can be used in similar programming languages 11
  • 12. EXAMPLE OF A SIMPLE ADDITION ALGORITHM  Step 1: Start  Step 2: Declare variables num1, num2 and sum.  Step 3: Read values num1 and num2.  Step 4: Add num1 and num2 and assign the result to sum.  sum←num1+num2  Step 5: Display sum  Step 6: Stop 12
  • 13. GIVEN VALUES OF THE VARIABLE P, Q, R, COMPUTE THE VALUE OF H=6P+8Q-R THEN WRITE ALGORITHM  Get values of p, q, and r  Compute H=6.p+8.q-r  Report the resulting value of H  End 13
  • 14. WRITE THE ALGORITHM FOR THE PROGRAM WHEN TAKES IN VALUES OF A, B, C, D, E AND Y AND COMPUTE X= A.Y.Y.Y.Y + B.Y.Y.Y + C.Y.Y.D.Y+E  Get values of A, B, C, D, E, Y  Compute X=A.Y.Y.Y.Y+B.Y.Y.Y+C.Y.Y-D.Y+E  Report the resulting value of X  End 14
  • 15. FLOW CHART  Flow chart is a diagrammatic representation of an algorithm or a program.  A flow chart is a type of diagram representing a process using different symbols containing information about steps or a sequence of events.  Flowcharts are helpful for:  Aiding understanding of relationships among different process steps  Collecting data about a particular process  Helping with decision making  Measuring the performance of a process  Depicting the structure of a process  Tracking the process flow  Highlighting important steps and eliminating the unnecessary steps  A flowchart consists of special geometric symbols 15
  • 16. 16 The main advantage of using a flowchart to plan a task is that it provides a pictorial representation of the task, which makes the logic easier to follow. We can clearly see every step and how each step is connected to the next. The major disadvantage with flowcharts is that when a program is very large, the flowcharts may continue for many pages, making them difficult to follow and modify.
  • 17. A TABLE OF THE FLOWCHART SYMBOLS ADOPTED BY THE AMERICAN NATIONAL STANDARDS INSTITUTE (ANSI) FOLLOWS. 17
  • 18. 18
  • 19. GENERAL RULES FOR FLOW CHARTING  1. All boxes of the flowchart are connected with Arrows. (Not lines)  2. Flowchart symbols have an entry point on the top of the symbol with no other entry points. The exit point for all flowchart symbols is on the bottom except for the Decision symbol.  3. The Decision symbol has two exit points; these can be on the sides or the bottom and one side.  4. Generally a flowchart will flow from top to bottom. However, an upward flow can be shown as long as it does not exceed 3 symbols.  5. Connectors are used to connect breaks in the flowchart. Examples are:  • From one page to another page.  • From the bottom of the page to the top of the same page.  • An upward flow of more than 3 symbols  6. Subroutines and Interrupt programs have their own and independent flowcharts. 19
  • 20. EXAMPLES 1. Draw a flow chart of y=3x+5 20 START READ X Y=3X+5 WRITE Y STOP
  • 21. 21 2. Draw the flow chart of the program which computes Z=2y+3x+3 START READ X,Y Z=2y+3X+3 WRITE Z STOP
  • 22. 22 3. Draw the flow chart of the program which computes the gradient of the line joining (x1, y1) and (x2, y2) START READ X1,Y1, X2, Y2 U=(Y2-Y1)/(X2-X1) WRITE U STOP
  • 23. PSEUDOCODE  Pseudocode is an abbreviated version of actual computer code (hence, pseudocode). The geometric symbols used in flowcharts are replaced by English-like statements that outline the process.  Pseudocode allows the programmer to focus on the steps required to solve a problem rather than on how to use the computer language.  Pseudocode has several advantages. It is compact and probably will not extend for many pages as flowcharts commonly do. 23
  • 24. PROGRAMMING TOOLS  A programming tool may be any software program or utility that aids software developers or programmers in creating, editing, debugging, maintaining and/or performing any programming or development-specific task.  Programming tools were initially designed to support or complement programming languages by providing the functionality and features these languages did not have.  Compilers, linkers, assemblers, disassemblers, load testers, performance analysts, GUI development tools and code editors are also all forms of programming tools. 24
  • 25. QUESTIONS??? THANK YOU FOR YOUR ATTENTION 25

Notas del editor

  1. Scalability of handover framework to handle increased handovers without compromising latency performance Flexibility to support various 4G deployments