Phases of Solving a Computational Problem:
How are problems with the computer resolved?
The problem-solving process with a computer leads to the writing of a
program and its execution in it. Although the process of designing a program is
essentially a creative process, a series of common phases or steps can be considered
which all programmers should generally follow.
The phases of problem resolution are:
1. Problem analysis
2. Algorithm design
3. Coding
4. Compilation and execution
5. Verification
6. Debugging
7. Documentation
The areas to be performed in each phase are:
1. Problem analysis:
This phase requires a clear definition that precisely outlines what must be done.
program and the desired result or solution (exercise statement)
2. Algorithm Design:
An algorithm is a method for solving a problem through a series of precise steps.
defined and finite.
I need: Indicate the order of execution in each case.
Defined: If followed twice, it yields the same result each time.
Finished: has an end, a determined number of steps.
The two most commonly used tools for designing algorithms are:
Pseudocode: it is a programming tool in which instructions are written in
words similar to English or Spanish.
Flowchart: it is a graphic representation of an algorithm. The symbols that are used
they have been standardized by the American National Standards Institute (ANSI)
3.Encoding:
It is the Scripture in a programming language representing the algorithm developed in the
previous stage.
4. Compilation and Execution:
It is the process of translating a program written in a programming language into a language
of machine understandable by the computer to be executable.
5. Verification:
It is the process of executing the program with a wide variety of input data.
test or trial data that will determine if the program has errors.
These data range from the normal input values to the extreme input values already
that this will allow checking the limits of the program.
Debugging:
It is the process of finding the errors in the program and correcting or eliminating those errors.
When a program is executed, three types of errors can occur:
Compilation error: It is usually caused by the incorrect use of language rules.
of programming and are usually syntax errors. If there is a syntax error, the computer
cannot understand the instruction not generating the object program.
Execution error: These errors occur due to instructions that the computer can
understand but not execute. For example, dividing by zero, square roots of numbers
negatives. In these cases, the execution of the program is stopped and an error message appears.
Logical errors: These errors are the most difficult to detect since the program can
function correctly and not produce compilation or execution errors and only warn of the error by the
obtaining incorrect results. The source of the error is often in most cases the
algorithm design and it is necessary to return to the design phase, modify the algorithm, change
the source program and compile and run once more.
7.Documentation:
The documentation consists of the description of the steps to be taken in the resolution process.
A problem, this can be internal or external. Internal documentation is that contained in
comment lines, the external documentation corresponds to user manuals with
instructions to run the program and to interpret the results.