Unit 1: Algorithm and Programming Development
Unit 1: Algorithm and Programming Development
Problem Definition
Problem Analysis
Algorithm Development
Coding & Documentation
Testing & Debugging
Maintenance
1. Problem Definition
• In this phase, we define the problem statement and we decide
the boundaries of the problem. In this phase we need to
understand the problem statement, what is our requirement,
what should be the output of the problem solution.
2. Problem Analysis
• In phase 2, we determine the requirements like variables,
functions, etc. to solve the problem. That means we gather
the required resources to solve the problem defined in the
problem definition phase.
3. Algorithm Development
• During this phase, we develop a step by step procedure to
solve the problem using the specification given in the previous
phase. That means we write the solution in step by step
statements.
6. Maintenance
• In this phase, the solution (program) is used by the end user. If
the user encounters any problem or wants any enhancement,
then we need to repeat all the phases from the starting, so
that the encountered problem is solved or enhancement is
added.
2. Flow charts and Algorithm development
• Input / Output
• Process / Instruction
• Decision
• Connector / Arrow
• Algorithm Example 1: Write an algorithm to add two nos.
• Step1: start
Step2: Read a, b
Step3: sum = a + b
Step4: write sum
Step5: stop
3. Program Debugging
• Debugging is the routine process of locating and removing
computer program bugs, errors, which is methodically handled by
software programmers via debugging tools.
• Some bugs are easy to remove; others can be difficult. These bugs
may appear at compile time and run time.
Problems
• Write a algorithm for multiplication of 3 numbers.
• Write a algorithm for division of 2 numbers.
• Write a algorithm for finding greatest among 3 numbers.