1.2.4 Types Of Programming Language Flashcards

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

Programming paradigms

A
  • are different approaches to using a programming language to solve a problem
  • can be imperative or declarative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Imperative languages/programming

A
  • uses code that clearly specifies the actions to be performed step by step
  • uses statements that change a programs state e.g in the form of sequence selection etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Declarative programming

A
  • states the desired result and the programming language determines best how to obtain the result
  • eg. Functional programming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Procedural programming/language

A
  • an imperative paradigm
  • breaks a solution down into subroutines
  • programs are written as a sequence of instructions to be executed
  • instructions are excecuted in a step by step manner
  • are easy to write and interpret
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Assembly language

A
  • Low level mnemonic representation of machine code that is computer architecture/processor specific
  • uses mnemonics which are abbreviations/ sequences of letters that are easy to remember e.g ADD for addition [1]
  • each line in assembly language is equivalent to one line of machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Modes of addressing

A
  • machine code instructions are made up of an opcode and operand
  • addressing mode specifies how the operand should be interpreted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Opcode

A
  • is part of the instruction and indicates what to do (as well as the addressing mode)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

4 modes of addressing

A
  • immediate addressing
  • direct addressing
  • indirect addressing
  • indexed addressing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Immediate addressing

A
  • the operand is the actual value upon which the instruction is performed
  • the operand is part of the instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Direct addressing

A
  • the value of the operand is a reference to the address in memory where the required value is located
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Indirect addressing

A
  • the operand gives the address of a register which holds another address where the data is located
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Indexed addressing

A
  • an index register is used which stores a certain value.
  • The address of where the data is located is determined by adding the operand to the contents of the index register
  • used to access data stored contiguously in memory eg. In arrays
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why are addressing modes used?

A
  • addressing modes allow for a much greater number of locations for data to be stored in, as the size of the operand would otherwise limit the number of addresses that could be accessed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Class

A
  • acts as a blueprint/template for creating objects with specific attributes and methods [1]
  • classes provide a way to organise code in a modular way [1]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Object

A
  • a particular instance of a class with its own unique values and properties
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Methods

A
  • are functions associated with objects or classes that define the actions an object can perform
17
Q

Function

A
  • performs a task and must return a single value
18
Q

Procedure

A

Performs a task but does not have to return a value

19
Q

Constructor method

A
  • a special method within a class that is automatically called when an object of that class is instantiated
  • used to create an instance of an object from a class [1]