1.2.4 Types of Programming Language Flashcards

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

What are programming paradigms?

A

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

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

Which two broad categories are programming paradigms split into?

A
  • Imperative,

- Declarative.

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

State the advantages of procedural programming.

A
  • Can be applied to a wide range of problems,

- Relatively easy to write and interpret.

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

State a use of declarative programming.

A
  • Expert Systems/ Knowledge-based Systems,

- Artificial Intelligence.

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

Identify the four main structures used in structured programming.

A
  • Sequence,
  • Selection,
  • Iteration,
  • Recursion.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does assembly language differ from machine code?

A

Assembly language uses mnemonics rather than binary. One line in assembly language is equal to one line in machine code.

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

What is the function of the STA mnemonic?

A

Storing the value in the Accumulator at the given memory address.

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

What is the function of the BRP mnemonic?

A

Branches to a given address if the value in the Accumulator is positive. It is a conditional branch.

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

State the function of the opcode and the operand.

A

The opcode specifies the instruction to be performed and the addressing mode. The operand holds the value which is related to the data which the instruction is to be performed.

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

State the four addressing modes.

A
  • Immediate Addressing,
  • Direct Addressing,
  • Indirect Addressing,
  • Indexed Addressing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a class?

A

A template for an object that defines the state and behaviour of an object. An object is an instance of a class.

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

What are some disadvantages of Object Oriented Languages?

A
  • Requires a different style of thinking which can be difficult for programmers accustomed to other paradigms to pick up,
  • OOP may not be suited to all types of problems,
  • Generally unsuitable for smaller problems.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly