A computer program is a set of formal instructions, which the computer executes in order to carry out some designated task. Whether that task is as simple as adding two numbers together or as complex as maintaining a large inventory for a multi-national corporation, there is a common element involved. They are both achieved by the computer executing a series of instructions – the computer program.
Programming can be defined as the development of a solution to an identified problem. There are six basic steps in the development of a program:
- Define the problem
This step (often overlooked) involves the careful reading and re-reading of the problem until the programmer understands completely what is required.
- Outline the solution (analysis)
Once the problem has been defined, the programmer may decide to break the problem up into smaller tasks or steps, and several solutions may be considered. The solution outline often takes the shape of a hierarchy or structure chart.
- Develop the outline into an algorithm (design)
Using the solution outline developed in step 2, the programmer then expands this into a set of precise steps (algorithm) that describe exactly the tasks to be performed and the order in which they are to be carried out. This step can use both structured programming techniques and pseudocode.
- Code the algorithm into a specific programming language (coding)
It is only after all design considerations have been met that a programmer should actually start to code the program. In preceding analysis it may have been necessary to consider which language should be used, as each has its own peculiarities (advantages and disadvantages).
- Run the program on the computer (testing)
This step uses a program compiler and test data to test the code for both syntax and logic errors. If the program is well designed then the usual time-wasting frustration and despair often associated with program testing are reduced to a minimum. This step will often need to be done several times until the programmer is satisfied that the program is running as required.
- Document and maintain the program (documentation)
Program documentation should not be just listed as the last step in the development process, as it is an ongoing task from the initial definition of the problem to the final test results. Documentation also involves maintenance – the changes that are made to a program, often by another programmer, during the life of that program. The better a program has been documented and the logic understood, the easier it is for another to make changes.
Latest posts by Suryateja Pericherla (see all)
- CPP program to rethrow an exception - 31/03/2017
- CPP program for handling divide by zero exception - 31/03/2017
- CPP program to create a function template for swapping - 31/03/2017