Introduction to Problem-solving II.pptx
Introduction to Problem-solving II.pptx
problem solving ii
DR JEREMIAH O. BANDELE
PhD Electrical/Electronic Engineering
University of Noingham
Learning objectives
Understand the
problem
Create a solution
step-by-step
plan
Evaluate and
refactor the
solution
Carrying out a solution plan
After understanding the problem and creating a solution plan, the next step is to solve the
problem. We need to tell the computer to solve the problem in a language it understands
using computer programs.
Carrying out a solution plan
● Coding
● Compilation and Execution
● Debugging and Testing
● Program Documentation
Coding
This refers to the process of writing the actual program that solves the problem.
Coding
A coded program is most popularly referred to as a source code.
The coding process can be done in any high level or low level programming language.
Coding
High level languages are written in forms that humans can easily understand. Examples are
C, C# and Java.
Coding
Low level languages are written in forms that the computer can easily understand.
Examples are assembly language and machine code.
Coding
The computer only understands machine codes, but they are very difficult to write and
troubleshoot because even small programs can have thousands of 0s and 1s.
Coding: an example
The example below shows how pseudocodes can be converted into codes;
Computer program are mostly written in either a high level language or with an assembly
language.Interpreters are used to convert high level languages into machine code directly.
Compilation and execution
Compilers are used to convert high level languages into assembly languages.
Compilation and execution
● User Documentation: This contains the information the end user needs for the
installation and use of the program.
● Programmer Documentation: This contains all the technical details so that the program
can be upgraded and maintained effectively.
Evaluating and refactoring the solution
The example below shows how a solution can be refactored for efficiency