1.2.4 Types of language Flashcards

(6 cards)

1
Q

Programming paradigms

A

Imperative:
Procedural
Object-Oriented

Declarative:
Functional
Logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Imperative

A

Procedural:
() Written as sequence of intructions
() Easy to write an interpret
+ Easy to write and understand

Object-Oriented:
() Suited to problems which can be broken down into reusable components
() Based on objects formed from classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Declaritive

A

() State the result, then the program detirmines how best to obtain this result
() Details about obtainedness are abstracted from user

Functional:
() Functions form the core of the program
() Closely linked to mathmatics

Logic:
() Set of facts and rules based on how the program is defined
() Queries are used to find answers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Procedural eval:

A

+ Clear flow
+ Easy to implement algorithms
- Not ideal for large scale projects: can’t manage complex behaviours, managing it becomes hard as it grows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Assembly

A

Low level (next up from machine code)
Uses mneonics
Commands are processor specific
Each line is equivilent to one line of machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Modes of addressing

A

Opcode: Specifices instruction
Operand: Specifices data

Addressing mode specifies how the operand should be interpreted

Immediate: Operand is the actual value
Direct: Address of operand is given
Indirect: Address of reigster which holds another address where data is located
Indexed: Index register is used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly