Computer Problem Solving Skills for JSS2

Computer Problem Solving Skills for JSS2 
Concept of Computer Program and Programming Language
If you want a computer to solve a given problem, you need a computer program. A computer program is a sequence of related instruction (command) that tell the computer how to accomplish a specific task. A program can also be defined as a set of instruction that is executed by the CPU.
Programming
Programming is the act of writing computer program. A computer program are written by trained and qualify people called programmer.
Computer Programming Language
A computer programming language is the language used to write instructions (commands) for the computer. Programming language is a means through which programmer communicate with the computer in solving different categories of problems. It consists of a set of rules governing how the words in the language should be written (syntax) and the meaning associated with each word (semantic).
Types of Programming Language
 
Computer language fall into three broad categories
1. Machine Language
2. Low Level Language (Assembly language)
3. High Level Language (HLL}
Machine Language
This was the first generation programming language. A computer will only understand one language, which is the machine language. There are two symbols in machine language; these are 1 and 0 generally called binary digits or bits. Machine language has many disadvantages since it requires the programmer to remember the numeric code of each instruction and location of each data in binary form. Also machine language is machine dependent, different machines have different language format.
Assembly Language
Assembly language is closest to machine language and as a result, is called a low level language. Assembly is made of abbreviated commands we can assemble into machine code. Acronyms with words such add (addition), sub (subtraction) and load (loading) are commonly used.
The major problems associated with assembly language are:
1. It is machine dependent
2.  The programmer has to know the numeric code for each machine.
High Level Language
These are programming languages that allow for program to be written in forms that are readable to human beings. High level languages are developed to overcome the limitations of machine and assembly languages. In high level structure, a program is written in forms that resemble the statement of the given problem in English. High level language can run on different machine provided appropriate translators are installed.
Examples of popular high level language are:
BASIC: Beginners All-purpose Symbolic Instruction Code
COBOL: COmmon Business Oriented Language
FORTRAN: FORmula TRANslation
ADA: Named after Ada Augusta
APL: A programming Language
RPG: Report Program Generator
PL1: Programming Language 1
dBASE: Data Base
LISP: List Processor
PASCAL
JAVA
 C++
 Programming tools and Technique
There are many tools and techniques that aid writing good computer programs, two of which are algorithm and flowchart.
Algorithm
This is an outline steps needed to solve a problem. Thus an algorithm should be clear, effective, and unambiguous. In addition, an algorithm should have input should produce output.
Example 1
Compute the area and circumference of a cycle given the diameter d. Use the formular and
Solution
Step 1: Start
Step 2: Get the diameter d
Step 3: Compute
Step 4: Compute
Step 5: Compute
Step 6: Displays the result
Step 7: Stop
Flowchart
This is the graphical representation of steps involved in solving a given problem
Some standard symbols used in drawing a program flow chart are:

One comment

Comments are closed.