Advantages of Subroutines (5)
Process of Stack Frames (9)
2 Types of Programming Paradigms
- types
- descriptions
- examples
Imperative
- “we use instructions to say how to get the output we want”
- Procedural Programming: use subroutines, selection, sequence, iteration
- Object Orientated Programming: use objects and classes
Declarative Programming
- “we say what we want”
- Functional Programming
Advantages of OOP (6)
Disadvantages of OOP (5)
Class (definition)
Instantiation (definition) (+ what happens)
The process of making an instance of an object
- usual for a constructor to run when an object is created
- this will set the values for the attributes of the object
Encapsulation is applied if (3)
Multiple Inheritance (2)
Aggregation (definition)
A relationship between objects/classes where an object/class contains other objects/classes
- “has a” association between objects/classes
- lifecycle of the two objects/classes is independent
- - both exist in their own right (if one deleted the other still remains)
Composition (definition)
A relationship between objects/classes where an object/class contains other objects/classes
- “a part of” association between objects/classes
- life cycle of the object/class is dependent on the other object/class that contains it
- - if you remove the parent object/class then all child objects/classes are removed
Polymorphism (definition)
The ability of a programming language to process objects differently depending on their data type/class
- the ability of a method to exhibit different behaviours depending on the object on which the method is invoked
- allows different classes to be used with the same interface
Hash Table (definition)
Data structure that creates a mapping between keys and values
Dictionary (definition) (data type)
Convex Combination of Two Vectors
Procedural Abstraction (definition)
Represents a computational method
Actual values are replaced by parameters
Functional Abstraction (definition)
Hiding computational methods from the rest of the solution
Data Abstraction
A data object, e.g. a stack, hides the details of how the data is actually represented, e.g. the use of arrays and pointers, allowing the user to know how to use it and not on how it is constructed
“Backus Naur form does … “
“BNF can … “
“All regular languages can …”
Turing Machines (3)
A UTM can be considered to be an interpreter as:
Abstraction by Generalisation (definition)
Grouping of common characteristics
Information Hiding
Hiding the details of an object that does not contribute to its essential characteristics
Problem Abstraction
Details are removed until the problem is represented in a way that is possible to solve because the problem reduces to one that has already been solved