1.2.4a Programming Pardigms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a programming paradigm? What are the broad categories of them?

A

Different approaches to using a programming language to solve a problem.

The broad categories are Imperative and Declarative.

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

What are the 2 Imperative programming languages? What are their main features?

A

Imperative uses code that specifies the actions to be performed to solve the problem.

Procedural => Uses a sequence of instructions that may be contained within procedures, e.g. Pascal, Python.
OOP => Built on entities called objects contained within classes that have certain methods and attributes, e.g. C#, Java.

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

What is the main Declarative programming language? What are its main features?

A

Declarative states the desired result and the programming language determines how to obtain this.

Logical => Uses code that defines a set of facts on rules based on the problem, and queries are used to find solutions, e.g. SQL.

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

What is the function of an addressing mode? What do each of them do?

A

They specify how the operand should be interpreted.

Immediate=> The operand is the actual value to be operated on.
Direct=> The operand holds the address of the value to be operated on.
Indirect => The operand holds the address of the address of the value to be operated on.
Indexed => The value of the operand is added to the index register which gives the address of the value to be operated on.

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