Last updated on October 2nd, 2023 at 05:13 pm

Life is a series of problems/situations that we need to analyze, make decisions about, and execute some steps to arrive at the desired result. This is often a mental process that we do seamlessly. However, depending on the difficulty of the problem, we may find it necessary to take the solution in stages. In the field of computer science and information technology, **the problem-solving process is a scientific process used during software development. **

During the early days of program development, many programs were built using the ad hoc approach. The unfortunate result is that many of those projects failed. In time, the process was refined to create a systematic process that involves clear steps that make the problem-solving and program development process much simpler and less prone to errors. As such, the stages of problem-solving are a crucial part of computer programming.

As you may have guessed from the above explanation, the process of creating computer programs involves two distinct phases:

- The problem-solving phase; and
- The program implementation phase.

In this article, we will look at the problem-solving phase only.

- What problem solving is; and
- A list of the stages in the problem-solving process.

## What is problem-solving?

In Information Technology, problem-solving involves breaking up a given problem into several key steps to ensure the* most efficient solution to the problem.*

Now that you know the definition of the problem-solving process, it is time to look at what the *stages in the problem-solving process* are.

## Stages in the problem-solving process

There are five stages in the problem-solving process. They have a definite order that should be used to arrive at a solution in a shorter period, have the best possible/most efficient solution, and have a smaller likelihood of program failure. The stages in the problem-solving process are:

- Understand and define the problem.
- Propose and evaluate solutions.
- Determine the most efficient solution.
- Develop the algorithm. and
- Test and evaluate the solution.

In the following stage, we will look at the first stage. Follow the links above to learn what the other stages entail.

## Understanding the problem

In life, it is always important to understand what a problem is before you attempt to solve it. Imagine if you encountered a water leak in your apartment. Would you automatically go out, buy a new length of pipe and replace what is already there? Of course, you won’t. It is imperative that you understand what the cause of the leak is before trying to solve it.

What you would do is check to see where the leak is and the reason for it. Maybe the paste is loose on the pipe. In this instance, simply pasting it may be the best solution. The thing is, you won’t be able to come up with the correct solution until you first develop an understanding of the problem.

Now, when a customer has an issue that he wishes to solve by writing a computer program, he may approach a programmer with the problem. However, when our customers explain their problem, more often than not, they simply describe the symptoms. It is your job as a computer programmer to ensure you have a clear understanding of the problem before you attempt to solve it.

If, as a programmer, you should attempt to solve a problem without first understanding it, you may find yourself coming up with a solution that does not fit the situation. Understanding the problem and coming up with the best solution is what we try to do in the problem-solving phase. Now, let’s look at the next part of this first phase. *How do we define the problem?*

## Defining the problem – the first phase in the problem-solving process

To define a problem, we use the table below called the problem-defining diagram, which is a simple table with the headings input, process, and output. So, once you have a problem, you need to identify the inputs which you expect the program to accept. In the output section, you should have the results you expect your program to print to the screen. In the proceeding section, you should have the list of things you expect your program to do listed in the order they should be performed. Do not go into too many details at this stage.

## Example of the problem defining diagram

Imagine if you were asked to **create a program that would accept as input three integer numbers, then find and print the total and average.** You first need to

- Read the problem carefully and
**identify your inputs and outputs**. - Once you have those, you need to
**look at the stages your computer program will go through to use the inputs to arrive at the outputs**.

This is not much different from what you would do in your math class, except it requires you to write down each step, even those that you do mentally. However, in this stage, you should only say what is to be done, not how you will do it.

Now let’s see the actual problem-solving diagram for this below.

Input | Process | Output |

Three integer numbers | 1. Read the three integers – num1, num2, and num3. | total |

num1, num2, num3 | 2. Calculate the total of the three numbers. | average |

3. Calculate the average of the numbers. | ||

4. Print the total. | ||

5. Print the average. |

The input section of the IPOS cycle is where we can find all the variables used in the IPO diagram and consequently the computer program. To learn about variables and consonants, visit variables vs. consonants.

## Propose and evaluate solutions

In solving problems, there are usually multiple solutions, but all we need is one. In this stage, your job is to come up with as many solutions as possible for the problem. You may do so individually or with members of your team. Once you have your solutions, you need to evaluate them to see their shortcomings and decide which solution you consider most efficient or which best suits your situation.

## Determine the most efficient solution

To determine the most efficient solution, you need to look at the shortcomings you have identified above. This will guide you in identifying which solution best suits your needs.

Once you have identified the solution you are working with, you move on to the next stage, which is developing the algorithm.

## Moving on

To explore algorithms, understand what they are, and how to prepare one properly, visit our article on what an algorithm is and how to prepare one. You may also explore the flow chart algorithm.

To explore the last phase of the problem-solving process, you may also visit our article on what is a trace table.

## Before you go

If you have any questions about the problem-solving process, be sure to leave them in the comment section below.