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

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 operand

A

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

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

state 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 behavior of an object . An object is an insurance 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
  • 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