Professional Documents
Culture Documents
1 CS1PR16 Problem Solving
1 CS1PR16 Problem Solving
Programming is a process of problem solving. In order for a computer to be able to solve a problem it
must be translated from natural language into an algorithm.
The difference between natural language and an algorithm is called a semantic gap – the difference
between 2 descriptions of an object using different linguistic representations.
The purpose of writing a program is to solve a problem. In order to be able to do that, we must:
Understand the problem
Break the problem down into manageable pieces
Design a solution for each of the pieces
Analyze the complexity of the algorithm – it may be necessary to break the problem down more
Consider alternatives and refine the solutions – first thought may not always be the best one
Implement the solution – the pieces come back together at this stage
Test the solution and fix any problems that still exist
Many software projects fail because the developers didn't fully understand the problem. We need to
avoid ambiguities and uncertainties. As the problems become larger, the solution must be organized
into manageable pieces.
Programming language