1.2.4. Types Of Programming Languages Flashcards

1
Q

What does it mean by Polymorphism?

A
Objects can be interpreted differently depending on their class or data type.
Static - overloading = passing different parameters into a method
Dynamic - overriding = redefining a Method within a subclass and altering the code so it functions differently and produces a different output.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Immediate Addressing Mode

A

The value in the data part is the actual value that is needed to be used.

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

What are methods?

A

Actions that a class or object can perform.

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

What does it mean by encapsulation?

A

When attribute is made private. Public methods are used to read and amend the attributes value.
It is used to hide the values or internal state of An object preventing direct access by unauthorised parties.
Reduces human error as the user will have to go through its methods first before the attribute can be amended.

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

Define Programming Paradigms

A

To describe a way of doing things.

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
9
Q

Machine code

A

Binary values that translate into electrical signals (in transistors).

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

Indexed Addressing mode

A

The value in the data is a reference to a memory location. Add the value in the index register to the value in the memory location. This new value is a reference to a memory location that holds the value required for the instruction.

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

Define object orientated programming

A

Attempts to capture or group info and data and related functionality (code) into structured items known as objects.

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

Little man computer

A

ADD - add value from register to current value of acc
SUB - subtract value from a register to current value of acc
STA - load contents of register into acc
INP - requires user input
OUT - output value of acc

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

What is a class?

A
It is not an object itself. It is a template used to set or define what attributes and methods an object has. 
Once you have defined a class, you can easily reuse that class and create many objects of that class.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

XXXX XXXX

? ?

A
  • 8 bits
  • first nibble is the instruction (opcode)
  • second nibble is the data/address part (operand)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is an object?

A

A group of info and data and related functionality (code) in structured items.
Each object is responsible for its own data and operations.

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

Define Procedural Programming

A

Consists of statements that tell the computer exactly what to do and is executed line by line.
It uses functions and procedures.

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

What does it mean by inheritance?

A
Subclasses inherit from a super class.
Using inheritance you can reuse the code from a class and extend its methods and attributes as another class.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is Assembly language?

A
  • low level language that is one level above machine code.
  • it used mnemonics making it easier to use. ( Each mnemonic is an abbreviation for machine code)
  • commands for assembly language are processor specific.
  • translated by a specific assembler. (one to one relationship)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Direct addressing mode

A

The value in the data part is a reference to a memory location that contains the value required to be used.

26
Q

What are attributes?

A

Properties of a class/ object

29
Q

Indirect addressing mode

A

The value in the data part is a reference to a memory location. Within that memory location is another reference to a memory location that holds the required value to be used.

30
Q

What are addressing modes?

A

Addressing modes are used to allow for a much greater number of data storage locations.

31
Q

Define Declarative programming

A

States the desired result and the programming language determines how best to obtain the result.

32
Q

branching and pipelining

A

BRP could be followed by 1 or 2 possible instructions which one will only be determined at execution. Meaning the wrong one could be fetched.