LA5:
PROGRAMMING
PROGRAM
Computer program is a
series of organised
instructions that directs a
computer to perform
tasks.
5.1 BASIC PROGRAMMING
CONCEPT
DEFINITION OF PROGRAM &
PROGRAMMING LANGUAGE
LEVELS & GENERATION OF
PROGRAMMING LANGUAGE
PROGRAMMING LANGUAGE
APPROACHES
PROGRAMMING LANGUAGE
 A programming language is a
set of words, symbols and
codes that enables humans to
communicate with computers.
GENERATIONS OF PROGRAMMING
LANGUAGE
Low Level
Languages
High-Level
Languages
Low Level Programming Language
First Generation
Programming Language
Second Generation
Programming Language
 1GL
 Machine language
 Is a set of instructions and
data that a computer’s
central processing unit can
execute directly.
 Written in binary code.
 Each statement
corresponds to one
machine action.
 2GL
 Assembly language
 Is a human-readable
notation for the machine
language used to control
specific computer
operations.
 Writes instructions using
symbolic instruction codes
that are abbreviations or
mnemonics.
High Level Programming
Language
Third
Generation
Fourth
Generation
Fifth
Generation
Third Generation
Programming Language
 3GL
 Procedural language
 Uses a series of English-like words, closer to
human language, to write instructions.
 Simpler, easy to read, write and maintain.
 Must be translated into machine language by
a compiler or interpreter,
 PASCAL, FORTRAN, BASIC, COBOL, C , C++.
Fourth Generation
Programming Language
 4GL
 Non-procedural language
 Enable users to access data in a database.
 SQL, NOMAD & FOCUS
Fifth Generation
Programming Language
 5GL
 Natural language
 Provide a visual / graphical interface
 Allow people to interact with computers
without needing any specialised knowledge.
 Prolog, Mercury, Visual Basic
PROGRAMMING APPROACHES
STRUCTURED
PROGRAMMING
EDUCATION
OBJECT-
ORIENTED
PROGRAMMING
STRUCTURED PROGRAMMING
EDUCATION
 Uses a top-down design model.
 Drawn as rectangles.
 Program is broken down into smaller section
– module.
 Have module / several module.
 Hierarchy of modules
 Example: Ada, Pascal, Fortran
OBJECT-ORIENTED PROGRAMMING
 Combine data with functions to create
objects.
 The object have relationship with one
another.
 Example: Smalltalk, Java, Visual Basic, C++.
DIFFERENCE BETWEEN
STRUCTURED & OOP
STRUCTURED
PROGRAMMING
OBJECT-ORIENTED
PROGRAMMING
 Uses top – down design
model.
 Uses object

Programming