0% found this document useful (0 votes)
599 views54 pages

Phases of Program Development Life Cycle

The document outlines the Program Development Life Cycle, which consists of six phases: Problem Definition, Problem Analysis, Algorithm Development, Coding, Testing & Debugging, and Documentation, Implementation and Maintenance. It details each phase's purpose and the characteristics of algorithms, including their representation through pseudo code and flowcharts. Additionally, it provides examples of algorithms for basic arithmetic operations and discusses flowcharting techniques and decision structures.

Uploaded by

lijirar723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
599 views54 pages

Phases of Program Development Life Cycle

The document outlines the Program Development Life Cycle, which consists of six phases: Problem Definition, Problem Analysis, Algorithm Development, Coding, Testing & Debugging, and Documentation, Implementation and Maintenance. It details each phase's purpose and the characteristics of algorithms, including their representation through pseudo code and flowcharts. Additionally, it provides examples of algorithms for basic arithmetic operations and discusses flowcharting techniques and decision structures.

Uploaded by

lijirar723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

PROGRAM DEVELOPMENT LIFE CYCLE

IT IS A SET OF PHASES AND STEPS THAT


PROGRAMMERS FOLLOW TO DEFINE, DESIGN,
DEVELOP AND MAINTAIN A COMPUTER
PROGRAM. THERE ARE SIX (6) PHASES IN
PROGRAMMING DEVELOPMENT LIFE CYCLE.
PHASES/STAGES IN THE PROGRAME
DEVELOPMENT LIFE CYCLE
1. Problem Definition (Phase 1)
2. Problem Analysis (Phase 2)
3. Algorithm Development (Phase 3)
4. Coding (Phase 4)
5. Testing & Debugging (Phase 5)
6. Documentation, Implementation and Maintenance (Phase 6)
PROBLEM DEFINITION (PHASE 1)

The developer defines the problem statement


and decides the boundaries of the problem.
As it gives the desired output requirement you
NEED to analyze the need to be able to come up
with a suitable programming solution
PROBLEM ANALYSIS (PHASE 2)
At this step, the developers decide a roadmap of
their plan and try to bring up the best software model
suitable for the project
The developer determines the requirements like
variables, functions, etc. to solve the problem. The
developer also determines the bounds of the solution
ALGORITHM DEVELOPMENT (PHASE 3)
•The developer develops a systematic procedure to
solve the problem using the specification given in the
previous phase. The algorithm can be developed using:
• Draw flowchart – graphical representation of step-
by-step instruction to be done in a program.
•• Write a pseudo code – list down the set of
instructions to be used in the program.
CODING (PHASE 4)
•This phase uses a programming language
(like C, C++, Java, PHP, etc.) to write or
implement actual programming
instructions for the steps defined in the
previous phase.
TESTING & DEBUGGING (PHASE 5)
•The developer checks whether the code
written in previous step is solving the
specified problem or not. The developer also
tests whether it is producing the desired
output or not
DOCUMENTATION, IMPLEMENTATION AND MAINTENANCE
(PHASE 6)

• During this phase (documentation), the programmer makes a


detailed description on how the program was created
• In these steps (maintenance), the users actively use the
program. If any enhancements found in this phase, all the
phases are to be repeated again to make the enhancements
ALGORITHMS
• In programming, algorithm is a set of well-
defined instructions in sequence to solve the
problem. Algorithm is a logical sequence of steps
for solving a problem, often written out as a flow
chart or pseudo code
CHARACTERISTICS OF AN ALGORITHM
Input and output should be defined precisely.
Each step 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
TECHNIQUES FOR REPRESENTING ALGORITHMS

Algorithms can be designed using


[Link] code.
[Link]
[Link] code
EXAMPLES OF ALGORITHMS IN PROGRAMMING
WRITE AN ALGORITHM TO ADD TWO NUMBERS ENTERED BY A USER.

•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
WRITE AN ALGORITHM TO ADD TWO NUMBERS ENTERED BY A USER .
ALTERNATIVE METHOD

1: Start
2: Let num1= integer, num2=integer and sum= integer
3: Input num1 and num2.
4: Sum = num1+num2
5: Display sum
6: End
ALGORITHM TO MULTIPLY TWO NUMBERS
Step 1: Start
Step 2: Declare variables num1, num2, and product.
Step 3: Read values of num1 and num2.
Step 4: Multiply num1 and num2 and assign the result to product.
product = num1 * num2
Step 5: Display product.
Step 6: Stop
ALGORITHM TO SUBTRACT TWO NUMBERS
Step 1: Start
Step 2: Declare variables num1, num2, and difference.
Step 3: Read values of num1 and num2.
Step 4: Subtract num2 from num1 and assign the result to
difference.
difference = num1 - num2
Step 5: Display difference.
Step 6: Stop
ALGORITHM TO DIVIDE TWO NUMBERS

Step 1: Start
Step 2: Declare variables num1, num2, and quotient.
Step 3: Read values of num1 and num2.
Step 4: Divide num1 by num2 and assign the result to quotient.
quotient = num1 / num2
Step 5: Display quotient.
Step 6: Stop
ALGORITHM TO CALCULATE THE AVERAGE OF TWO NUMBERS

Step 1: Start
Step 2: Declare variables num1, num2, and average.
Step 3: Read values of num1 and num2.
Step 4: Calculate the average by adding num1 and num2, then
dividing by 2, and assign the result to average.
average = (num1 + num2) / 2
Step 5: Display average.
Step 6: Stop
TAKE HOME ASSIGNMENT
1. Algorithm to Find the Remainder of Two Numbers
2. Algorithm to Calculate the Square of a Number
3. Algorithm to Find the Square Root of a Number
4. Algorithm to Calculate the Area of a Circle
TECHNIQUES FOR REPRESENTING ALGORITHMS

Algorithms can be designed using


[Link] code.
[Link]
[Link] code
PSEUDO CODE
• Is a generic way of describing an algorithm
without use of any specific programming language
syntax. It cannot be executed on a real computer,
but it models and resembles real programming
code, and is written at roughly the same level of
detail
EXAMPLE OF A PSEUDO CODE 1
•READ name, hourlyRate, hoursWorked, deductionRate
•GrossPay = hourlyRate * hoursWorked
•Deduction = grossPay * deductionRate
•NetPay = grossPay – deduction
•WRITE name, grossPay, deduction, netPay
EXAMPLE OF A PSEUDO CODE 2
• Start
• Declare num
• Input num
• If num > 0 Then
• Output "Positive"
• Else If num < 0 Then
• Output "Negative"
• Else
• Output "Zero"
• End If
• End
FLOW CHARTS
Is a diagrammatic representation of an algorithm,
workflow or process. A flow chart 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 shows the
order in which they occur
FLOW CHARTING SYMBOLS
Symbol Name Function
Indicates any type of
internal operation inside
Process the Processor or Memory
like data transformation,
data movement, logic
operation, etc.

Input/
Used for any
Input/Output operation.
Indicates that the
Outp computer is to obtain
Used to ask
Decisio questions that can
be answered in a

n binary or boolean
format (Yes/No,
True/False)

Connect Connects sections


of flowchart, so
that the diagram
or can contain a
smooth, linear
flow.

Terminat Indicates the


starting or ending
Shows
Flow direction
Lines of flow

Used to
Predefine invoke a
subroutine
d process or an
interrupt
GENERAL RULES FOR FLOWCHARTING
1. All boxes of the flowchart are connected with arrows. (Not
lines)
2. Flowcharts symbols have an entry point on the top of the
symbol with no other entry points. And the exit point is always
at the bottom except for Decision symbol.
3. The decision symbol has two exit points, these can be on
the side or the bottom and one side.
4. Connectors are used to connect breaks in the flowchart. Examples
are;
• From one page to another.
• From the bottom of the page to the top of the same page.
5. Subroutines and Interrupt programs have their own and
independent flowcharts.
6. All flowcharts start with a Terminal or Predefined Process (for
interrupt programs or subroutines) symbol.

7. All flowcharts end with a terminal or a contentious loop.


FACTORS TO CONSIDER IN CONSTRUCTING FLOWCHARTS
1. Think through the problem solution step-by- step.
2. Analyse the specifications in terms of
• the required inputs
• the output desired
• the operations and procedures required to produce the output
3. Clarify the problem by having a narrative definition of the problem
4. Develop a flowchart showing the logic, steps, and sequence of steps you
want the computer to execute in order to solve the problem.
ALGORITHM BUILDING BLOCKS
All problems can be solved by employing any one of the following
building blocks or their combinations.
• The Sequence Structure
• Conditional Structure / Selection Structure (Decision)
THE SEQUENCE STRUCTURE
•The sequence structure is a case where the steps in an
algorithm are constructed in such a way that, no condition
step is required. The sequence structure is the logical
equivalent of a straight line.
For example, suppose you are required to design an
algorithm for finding the average of six numbers, and the
sum of numbers given,
THE PSEUDO CODE WILL BE AS FOLLOWS;
Start
Get sum
Average = sum/6
Output the average
Stop
DRAW A SEQUENTIAL FLOW CHART FOR THE
ALGORITHM BELOW
1: Start

2: Let num1= integer, num2=integer and sum= integer


3: Enter num1 and num2.
4: Sum = num1+num2
5: Display sum
6: Stop
STAART

ENTER NUM1
ANDNUM 2

SUM = NUM1 + NUM 2

DISPLAY SUM

END
DRAW A FLOW CHART FOR THE ALGORITHM BELOW

• Step 1: Start
Step 2: Declare variables num1, num2, and average.
Step 3: Read values of num1 and num2.
Step 4: Calculate the average by adding num1 and num2, then
dividing by 2, and assign the result to average.
average = (num1 + num2) / 2
Step 5: Display average.
Step 6: Stop
STAART

ENTER NUM1
ANDNUM 2

average = (num1 + num2) / 2

DISPLAY
AVERAGE

END
DRAW A FLOW CHART FOR THE ALGORITHM

• Step 1: Start
Step 2: Declare variables num1, num2, and quotient.
Step 3: Read values of num1 and num2.
Step 4: Divide num1 by num2 and assign the result to quotient.
quotient = num1 / num2
Step 5: Display quotient.
Step 6: Stop
STAART

ENTER NUM1
ANDNUM 2

quotient = num1 / num2

DISPLAY
QUOTIENT

END
DECISION STRUCTURE / SELECTION STRUCTURE
(CONDITIONAL)

It is a structure where in the algorithm,


one has to make a choice of two alternatives
by making decision depending on a given
condition
EXAMPLE, IN THE PSEUDO CODE AND FLOWCHART FORM
If condition is True
Then do task A
Else
Do Task B
• In this example, the condition is evaluated, if the condition
is True Task-A is evaluated and if it is False, then Task-B is
executed
TRUE FALSE
TYPES OF FLOWCHARTS
•Data Flow Diagram (DFD)
DFD reveal relationships among and between the
various components in a program or system. DFDs
consists of four major components: entities,
processes, data stores, and data flows.

System Flowcharts
System flowcharts are a way of
displaying how data flows in a system
and how decisions are made to control
events
EXAMPLE OF ALGORITHM AND FLOWCHART
•Algorithm & Flowchart to find the sum of two numbers.
A: First Number
B: Second Number
Algorithm
Step 1: Start
Step 2: Input two numbers A & B
Step 3: SUM = A + B
Step 4: Output SUM
Step 5: Stop
Algorithm & Flowchart to convert temperature from Celsius to Fahrenheit.
C: Temperature in Celsius
F: Temperature in Fahrenheit
Algorithm
Step 1: Start
Step 2: Input C
Step 3: F = (9.0/5.0 * C) + 32
Step 4: Output “Temperature in Fahrenheit is” F
Stop 5: Stop
•Algorithm & Flowchart to find Area and Perimeter of Square.
L: Side Length of Square
Area: Area of Square
Perimeter: Perimeter of Square
Algorithm
Step 1: Start
Step 2: Input L
Step 3: Area = L * L
Step 4: Perimeter = 4 * L
Step 5: Output “Area is” Area, “Perimeter is” Perimeter
Step 6: Stop
ALGORITHM & FLOWCHART TO FIND SIMPLE INTEREST.

•P: Principal Amount Algorithm

Step 1: Start
•N: Time in Years
Step 2: Input value of P, N, R
•R: % Annual Rate of
Step 3: SI = (P x N x R)/100.0
Interest
Step 4: Output “Simple Interest is ” SI
•SI: Simple Interest Step 6: Stop
Algorithm & Flowchart to find the largest of two numbers.

NUM1: First Number

NUM2: Second Number


Algorithm
Step 1: Start
Step 2: Input two numbers say
NUM1, NUM2
Step 3: IF NUM1 > NUM2 THEN
Output “largest is ” NUM1
ELSE
Output “largest is “ NUM2
ENDIF
Algorithm & Flowchart to find the largest of
three numbers.
Num1: First Number
Num2: Second Number
Num3: Third Number
• Algorithm

•Step 1: Start
•Step 2: Read three numbers say num1, num2, num3
•Step 3: If num1>num2 then go to step-5
•Step 4: IF num2>num3 THEN

•Output num2 “ is largest”


•ELSE
•Output num3 “ is largest”
•ENDIF
•GO TO Step-6

•Step 5: IF num1>num3 THEN


•Output num1 “ is largest”
•ELSE
•Output num3 “ is largest”
•ENDIF
•Step 6: Stop

You might also like