1.2.4 Types of Programming Language 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

What two broad categories are programming paradigms split into?

A

Imperative and 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 applies 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

Any from:

  • 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 programming structures used in structures 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 (most of the time)

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

What is the function of 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 of 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 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 on 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 4 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

Give one disadvantage of Object Oriented Languages

A

One from:

  • 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