Professional Documents
Culture Documents
Overview of C Language
Module 3
•ExitEg C, Pascal
Program Development
Program Development include the following phases:
Problem Definition
Problem Analysis
Design of Solution
Design tools
Computer Solution
Coding
Testing and Debugging
Documentation
Maintenance
Problem Definition and Analysis
Problem Definition:
This step defines the problem thoroughly. Here requirements are specified. This
step includes understanding the problem very well.
The problem solver must understand problem very well to solve problem
efficiently.
A clear and concise problem statement is provided.
The problem definition should specify the input and output.
Problem Analysis:
Analyzing the problem or analysis involves identifying the following:
Inputs, i.e. the data you have to work with.
Outputs i.e. the desired results.
Any additional requirements on the solutions.
Design of solution
To achieve the best possible solution to a given problem, various
design strategies are suggested and used.
Some commonly used strategies are:
Divide and conquer
Top down approach
Bottom up approach
Modular design
Structured programming
A good design can be implemented through design tools such as
algorithm and flowcharts.
Design tools - Algorithm
An Algorithm is a step-by-step procedure to solve a given problem.
A well defined algorithm has the five basic characteristics; as follows
• Input − An algorithm should have 0 or more well-defined inputs.
• Output − An algorithm should have 1 or more well-defined outputs, and should
match the desired output.
• Finiteness − Algorithms must terminate after a finite number of steps.
Unambiguous − Algorithm should be clear and unambiguous.
Feasible: The algorithm must be simple, generic and practical, such that it can be
executed upon will the available resources.
Algorithm -Example
Problem − Design an algorithm to add two numbers and display the result.
Once the flow chart is drawn, it becomes easy to write program in any high level
language.
Symbols used in Flowchart
Flowchart
Flowchart to convert temperature from Celsius to Fahrenheit