Introduction To Programming Methodology
Introduction To Programming Methodology
Programming
Methodologies
– In order to solve a problem, first we want to define the problem. Second step is
to design the algorithm to solve that problem.
– Writing and executing programs and then optimizing them may be effective for
small programs.
– But for a large program, each part of the program must be well organized
before writing the program
– There are few steps of refinement involved when a problem is converted to
program; this method is called stepwise refinement method.
– There are three steps in refinement process
– In the first stage, modeling, we try to represent the problem using an
appropriate mathematical model such as a graph, tree etc. At this stage, the
solution to the problem is an algorithm expressed very informally.
– At the next stage, the algorithm is written in pseudo-language (or formal
algorithm) that is, a mixture of any programming language constructs and less
formal English statements. The operations to be performed on the various types
of data become fixed.
– In the final stage we choose an implementation for each abstract data type and
write the procedures for the various operations on that type. The remaining
informal statements in the pseudo-language algorithm are replaced by (or any
programming language) C/C++ code.
Programming Style