Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

High level language

High level of abstraction


User friendly
Machine independent
Faster development time
Easy to debug
Eg. python

Slow
Require interpreter or compiler
Can’t directly control the machine

Low level language


Faster
Can directly control the machine
Not require compiler or interpreter
Eg. machine code

Harder to understand
Hard to debug
Machine dependent

Translator – translate High level language to machine


code
Compiler
Translate the whole program
Generate the executable file
Faster
Difficult to debug
Compiled program---no need the compiler

Interpreter
Translate the program line by line
Do not generate executable file
Slow
Easy to debug
Interpreted program--- need the interpreter
Assembler
Translate assembly language to machine code
Mnemonic code

Variable
To store the value, that can be changed
Constant
To store the value, Can’t change

Global variable
Declare outside the scope
Can be accessed from any part of the program
Local variable
Declare within the scope
Can access within the scope
Error
Logic-incorrect result
Syntax-incorrect spelling, missing value
Run time- execution time(divide by zero)

Test data
Normal test-----within the limit
Boundary test------max and min
Erroneous test-----outside the limit
Eg. mark-----0 to 100
Normal ------ 70,90
Boundary ----- 0,100
Erroneous ----- -5,120

Iteration-loop
for- count control loop --- definite time
while- precondition loop --- 0 or more
repeat until – post condition loop --- at least 1
Relational operator
> < >= <= == !=

Logical operator
And or not

Basic data type


Float/real
Integer
Boolean
String
Character

Parameter
To assign the value to the function
To reuse, to save the memory
Function
To group code
To reuse
Easy to maintain

Maintainable program
Comments
Meaningful variable name
Function

Algorithm
Step by step instruction to solve the problem

Trace table characteristics


To debug
To track the value of variable

Bubble sort vs. merge sort


Linear search vs. binary serach
Game installer develop-----compiler
Embedded system sensor-----Assembler
Guess game------ Interpreter

You might also like