Professional Documents
Culture Documents
0)
task.
Low-level programming
languages
High-level programming
languages
Third Generation
• Uses a series of English words and mathematical symbols for writing programs
to write instructions.
• Example: COBOL, BASIC, C and ADA
Forth Generation
• A very high-level programming language
• Non-procedural language enables users to access data in a database.
• Example: SQL
Fifth Generation
• Visual programming language (natural language).
• Provides a visual or graphical interface, called a
visual programming environment, for
creating source codes.
• Example: Prolog and Mercury
Programming Language Approaches (5.1.3)
Programming Languages
Approaches
• uses a top-down design model where developers map out the overall
program structure into separate subsections from top to bottom and also
known as modules
Translator (5.1.4)
Translator
Assembler
• An assembler is a computer program that translates assembly language
into machine language.
• For example in Intel 80836, the assembly language for the ’no
operation’ command is NOP and its machine code representation is
10010000.
• Examples of assemblers are MACRO-80 Assembler and Microsoft MASM.
Interpreter
• An interpreter is a computer program that translates a high-level
language into machine language.
• Translate programming statement of a program into machine language.
• Translate programming statement line by line and execute it
immediately.
• No object code saves.
• Interpreter code run slower
• Examples of interpreter-based language are BASIC, Logo and Smalltalk.
Compiler
• Compiler is a program that translates a high-level language into
machine language.
• Compiler translates entire programming statement and executes it
later.
• Save machine language in an object code on the disk.
• Compiled code run faster.
• Several programming languages like C++, Pascal and COBOL used
compilers as their translators.
Constants Variables
Value is not changeable
Value can be changed
Characteris during the course of the
anytime during the course
tics program.
of the program.
Use constant when you
Use variable to store data
want to declare something
that may or will change
Usage that won’t be changed
during the running of the
midway in your program
program.
execution.
Data type determines the type of data a variable can store, for example a number
or a character. Examples of data types are integer, double, string and Boolean.
Flow Chart
Notes:
Five basic elements in programming are:
• Constant
• Variable
• Data Type
• Operators
• Control Structures
Constant
Constant is a data container that stores information. The value will never change
(remains constant) at any time during the course of a program.
Declare is the official term used in programming to announce to the program the
condition of statement in programming.
Variable
Variable is a data container that stores information. The value inside may change
at any time during the course of a program.
Data types
Operator symbol
+ (plus) >(greater than)
-(minus) <(less than)
/(divided) =(equal to)
*(multiplied) <>(not equal to)
Control structures
Control structures allow the programmer to control the flow of a program.
Problem Analysis
• Refer to book and website, ask expert and meet with system analyst and
users
• Example: client need to set up a School registration program. School
administrator (user) might tell the programmer that they need to record
students’ data such as name, date of birth, gender, class, parents’ names,
address and contact numbers).
Program Design
• Create a solution algorithm for each modules (logic structure)
• Design a flow chart (logical sequence) that represents the needs of the
client
Coding
• Coding is the next step after the program logic has been formulated using
the appropriate programming language such as C++ and Visual Basic
Documentation Phase
Resources
Books
1. Shelly Cashman, (2010). Discovering Computer
2. CD Courseware KPM
Websites
1. http://www.bukisa.com/articles/108793_program-development-phase
2. http://en.wikipedia.org/wiki/Object-oriented_programming