SLR 07 - Types of Programming Language Flashcards

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

What are the types of Addressing Methods?

A

Immediate
Indexed
Direct
Indirect

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

What is direct Addressing?

A

This happens when the Operand value is the address to fetch from or execute onto. (e.g ADD 5 means add the value from address 5)

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

What is Immediate Addressing?

A

The Operands value being used for the instruction. (e.g ADD 5 means add the value of 5)

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

What is indirect addressing?

A

The operand giving an address, in said address another address value is contained for execution. (e.g in address 5, 45 is contained. ADD 5 means add the value from register by indirect addressing 45)

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

What is the problem with direct addressing and how does indirect addressing fix it?

A

Direct addressign uses 4 bits, only allowing use of registers 0-15
Registers are 8 bit, by using indirect addressing you can then access registers 16-255

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

What is indexed addressing?

A

It uses the address equal to the Operand plus the Index Register, which increments every cycle.

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

What is a paradigm?

A

An example of a way to complete a process.

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

What is a language with paradigms called?

A

Turing Complete

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

What can turing complete languages do?

A

Solve all computable problems

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

What is machine code?

A

Low levels of abstraction
It programs in 1s and 0s

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

What is Assembly Language?

A

Written in Mnemonics that are a 1:1 with sequences of machine code

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

What are High-Level languages?

A

They have high levels of abstraction
Each function has a 1:M relationship with lines of machine code

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

What can High-Level languages be divided into?

A

Imperative and Declarative

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

What are the 2 main Paradigms in imperative languages?

A

Procedural Programming
Object-Oriented Programming

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

What are Procedural programs?

A

A paradigm where programs are built on several subroutines?

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

What are Object-Oriented programs?

A

An extension of imperative programming that focuses on modular approaches

17
Q

What main languages are built on OOP?

A

C++
Java
C#

18
Q

What are the advantages of low-level languages?

A

They are very precise, optimised and efficient code
Direct access to system features
Complete code control

19
Q

What are the disadvantages of low-level languages?

A

Machine dependant
Hard to write efficient code
Tedious to write and prone to bugs
Hard to understand

20
Q

What is an object?

A

Anything including data structures, people etc.

21
Q

What is a class?

A

An objects information divided into sections and assigned to a class

22
Q

What are the 3 sections of a class?

A

Name
Attributes - All information related to the class
Methods - All functions associated to deriving attributes of a class

23
Q

What is the exam syntax for creating a class?

A
  1. Class followed by the class name
  2. Private followed by attributes
  3. Methods, public, procedure end procedure
  4. End class
24
Q

What is the process of turning a class into an object?

A

Instantiation

25
Q

What is the process of inheritance?

A

A subclass taking the details of a superclass and placing them into a new class.

Classes can also be derived from derivations.

26
Q

What can be used to override superclass attributes?

A

Methods can be executed to override super attributes and it takes precedence

27
Q

What is encapsulation?

A

Bundling data with methods
Hides values or object states by unauthorised access

28
Q

What can encapsulated attributes be accessed by?

A

The provided methods

29
Q

What is Polymorphism?

A

Something that occurs in several forms?

30
Q

What are the types of polymorphism?

A

Static
Dynamic

31
Q

What is static Polymorphism?

A

Implementation of multiple methods in a class of the same name

32
Q

What must differ with parameters in Polymorphism?

A
  1. a different number of parameters
  2. Different Data types
  3. Different order of paramaters expected