PROCESS OF PROGRAM DEVELOPMENT
STAGES OF PROGRAM DEVELOPMENT PROCESS
1. PROBLEM ANALYSIS AND PLANNING:
The Planning stage is the stage
where programmers decide and
define the tasks that should be
performed by the program.
2. PROGRAM DESIGN/PROGRAM MODELLING:
This stage deals with the flow of the
program, the way it should produce output
and gather inputs, the interface or the
working environment of the program, and
how it should be used.
The software developer makes use of tools
like algorithms and flowcharts to develop
the design of the program.
o Algorithm
o Flowchart
FLOWCHARTING SYMBOLS
A flowchart is a diagram made up of
boxes, diamonds and other shapes,
connected by arrows - each shape
represents a step in the process, and the
arrows show the order in which they
occur.
FLOWCHARTING SYMBOLS
GENERAL RULES FOR FLOWCHARTING
1. All boxes of the
flowchart are connected
with Arrows. (Not
lines)
GENERAL RULES FOR FLOWCHARTING
3. The Decision symbol
has two exit points;
these can be on the sides
or the bottom and one
side.
GENERAL RULES FOR FLOWCHARTING
3. The Decision symbol
has two exit points;
these can be on the sides
or the bottom and one
side.
GENERAL RULES FOR FLOWCHARTING
3. The Decision symbol
has two exit points;
these can be on the sides
or the bottom and one
side.
GENERAL RULES FOR FLOWCHARTING
4. 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.
GENERAL RULES FOR FLOWCHARTING
5. All flowcharts
start with a
Terminal or
Predefined Process
(for interrupt
programs or
subroutines)
symbol.
GENERAL RULES FOR FLOWCHARTING
6. All flowcharts end with
a terminal or a contentious
loop
Example 1: Suppose you are required to
design an algorithm for finding the average
of six numbers, and the sum of the numbers
is given. The pseudocode will be as follows:
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Flowchart
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Example 2: The following pseudo-code
describes an algorithm which will accept two
numbers from the keyboard and calculate the
sum and product displaying the answer on the
monitor screen.
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Decision Structure or Selection Structure
Selection structures are also
called case selection structures
when there are two or more
alternatives to choose from.
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Decision Structure or Selection Structure
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Decision Structure or Selection Structure
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Decision Structure or Selection Structure
ALGORITHM/PSEUDOCODE TO
FLOWCHART EXAMPLES
Practice Activity -
WRITING ALGORITHM and Flowchart
• Finding the area of square.
Input- Read L
Output-" Print area"
Practice Activity -
WRITING ALGORITHM and Flowchart
2. Finding the area of Rectangle.
Input- Read a,Read b
Output-Print "area"
Practice Activity -
WRITING ALGORITHM and Flowchart
3. Calculating the average of three
numbers.
Input - Read A,B, C
Output- Print Average
Activity
7WRITING ALGORITHM and Flowchart
!. Greatest of two numbers
input - (num 1, num 2)
output - Print "A is large"
Print "B is large"
Activity 7 WRITING ALGORITHM and Flowchart
2. Determine Whether Student A Passed or Not
• Input grades of 4 subjects S1, S2, S3 and S4
• Calculate the average grade
• If the average grade is less than 85, print
"FAIL", else print "PASS".
3. CODING THE PROGRAM:
It is the process of expressing the fully
detailed algorithm to a standard high-
level programming language.
Coding is the act of actual writing of
the computer program.
3. CODING THE PROGRAM:
Coding is generally a very small part of
the entire program development process
and also a less time-consuming activity
in reality.
3. CODING THE PROGRAM:
For effective coding some of the guide
lines which are applied are :
o Use of meaningful names and labels of variables,
o Simple and clear expressions,
o Modularity with emphasis on making modules generalized,
o Making use of comments and indenting the code properly,
o Avoiding jumps in the program to transfer control.
4. TESTING AND DEBUGGING:
The Testing Stage is where the programmer
makes sure that the program performs the
way it is intended.
A. DESK CHECKING
B. TRANSLATION
C. DEBUGGING
A. DESK CHECKING
Process of sitting in a desk and checking
the source code, proofreading it for
obvious syntax errors as well as looking
for logical errors which are not
immediately detectable.
TYPES OF ERRORS
Runtime Errors – a program errors that occurs
while the program is running
Syntax Errors- Violations of the rules of a
specific programming language.
Logical Errors- Mistakes in the algorithm or
program design which are not easily detected.
B. T R A N S L AT I O N
It is the conversion of the source code
to the internal instructions that the
computer required.
C. DEBUGGING
It is the process of detecting, locating
and correcting logic errors (bugs) by
submitting a translated program to the
computer for execution and seeing what
happens.
SOME COMMON ERRORS WHICH MIGHT OCCUR IN
THE PROGRAMS INCLUDE:
• Uninitialization of variables.
• Reversing of order of operands.
• Confusion of numbers and characters.
• Inverting of conditions e.g., jumping
on zero instead of on not zero.
5. DOCUMENTATION:
It is the detailed description of a
program’s algorithm, design, coding
method, testing and proper usage.
5. DOCUMENTATION:
Documentation also contains technical
information such as where and who created
the program, who contact when there’s a
problem with the program and instructions
on the use and maintenance of the
program.
6. MAINTENANCE:
The final stage in programming is in
maintaining or updating the program.
Maintenance becomes essential in following situations:
o Change in specification,
o Change in equipment,
o Errors which are found during the actual execution
of the program
ACTIVITY8: PROGRAM DEVELOPMENT CYCLE
A. What is program development cycle? What it is used for?
What are the steps in program development cycle?
B. Explain each step
C. Describe the types of errors.