Chapter 1: Fundamental of Computer Problem Solving
Chapter 1: Fundamental of Computer Problem Solving
Introduction to Computer.
Basic operations in a computer system.
Computer Programs.
Generation of Programming Languages.
Language Translators.
The importance of programming.
Programming Process
Structured Programming vs. Object Oriented
Programming.
Principles of Structured Programming
Introduction to Computer
Computer = an electronic device that input, stores, processes
data (input, output, storage and processing devices) and generate the
useful information.
9 Software
Step-by-step instructions that tell the computer how to do its
work.
It is also called a program.
Its purpose to convert data to useful information.
PROCESSING
Convert input data into
information.
E.g. CPU
OUTPUT
Generate the useful
information using output
devices
E.g. Monitor, printer
Computer Software
SOFTWARE
SYSTEM SOFTWARE
provides an environment for user
to execute the application software.
Enables the application software
to interact with computer
hardware.
Eg. Operating System
APPLICATION SOFTWARE
end user software.
A program that performs a
common task to the user.
Eg. Word, Excel.
Computer Programs
Program = a set of instructions that the computer needs to follow
to process the data into information.
Generation of Programming
Languages
9
2nd generation
z
4th generation
z
3rd generation
z
5th generation
z
Language Translator
Language Translator = a program that accepts a humanreadable source statements and produces machine-readable
instructions. There are Assembler, Compiler, Interpreter.
SOURCE CODE
ASSEMBLER
a program that
translates the assembly
language program into
machine language.
COMPILER
a program that translates
high-level language into
machine language.
Translate the source code
once and saves to be reused.
Requires less memory and
runs faster.
Eg. PASCAL, C++, COBOL
INTERPRETER
a program that translates
source code of high-level
language into machine
language.
Each instruction is
interpreted into machine
language.
Program is easier to develop.
Eg. BASIC.
Spacing
Indent
Comment
Variable name
Programming Process
Define
the problem
Develop an algorithm
Code the program
Test and debug the program
Document and maintain the program
Develop an Algorithm
Algorithm
Pseudocode
Flowchart
Documentation
Written description of a program, what it does and
how to use.
Purpose for reference to other programmers if any
maintenance to be taken.
Maintenance
Any activities to keep the program in good working
condition, error free and up-to-date.
Involves any amendments, additional coding or
repairs to the programs.
Structured Programming VS
Object Oriented Programming
Structured Programming
Use Standard logic tools (Control structures) : Sequential = one program statement follows another in
sequence order.