Key words and terms Flashcards

(49 cards)

1
Q

What is an array?

A

Data structure for storing finite / ordered set of data using same data type.

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

Compare local variables with global variables.

A

Local:
- Limited scope - only accessed within subroutine they are defined.

Global:
- Accessed throughout whole program. Useful for values accessed by multiple parts of program.

Local > Global:
- Local are self contained - not affected outside of subroutine
- Global can be unintentionally overwritten.
- Global not deleted until program terminates - uses more memory.

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

What is a Boolean?

A

Data type that can only store 2 possible values (1 / 0, TRUE / FALSE)

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

What is a character?

A

Data type for storing a letter / number or special character

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

What is a data type?

A

Attribute determining what type of data is being stored

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

What is a pointer / reference?

A

Data type used to store memory addresses of objects created at runtime

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

What are records?

A

Data structure which stores related data in ‘fields’ - organised based on attributes.

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

What is assignment?

A

Statement for giving created variable value consistent with data type.

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

What is constant declaration?

A

Statement for creating a constant in a program

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

What is iteration?

A

Programming structure where set of statements are repeated in fixed number of times.

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

What is selection?

A

Programming structure for deciding which statements to perform next based on certain conditions.

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

What are subroutines

A

Uniquely named section of code written to perform a set of conditions.

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

What are stackframes?

A

Store return addresses, parameters and local variables for each subroutine call.

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

What is variable declaration?

A

Statement for creating a variable in a program

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

What is an arithmetic operator?

A

Operator taking 2 numeric values and performing some form of mathematical manipulation.

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

What is truncation?

A

Removing decimal place without rounding

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

What is concatenation?

A

Process of combining 2 strings into a singular larger string.

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

What is exponentiation?

A

Arithmetic Operator that raises numeric value to power of other numeric value and returns result.

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

What is modulo?

A

Arithmetic operator that divides numeric value by another and returns remainder.

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

What is recursion?

A

Defining a problem in terms of itself.

Calling a function within itself.

21
Q

What is the Procedural Programming Paradigm?

A

Programs formed from sequences of instructions, executed in the order they appear.

22
Q

What is encapsulation?

A

Name for combining methods and procedures to form an object.
Forms a single entity which holds the objects properties and methods.

23
Q

What is inheritance?

A

A class can inherit another class which allows it to share properties and methods.

24
Q

What is polymorphism?

A

Occurs when objects are processed differently depending on their class.

25
What is overiding?
When a method has the same name as a method in an inherited class, but with a different implementation.
26
What is association?
When 2 objects are described as having a 'has a' relationship - car and driver - car has a driver.
27
What is aggregation?
When an object is associated with another, it will still exist if containing object is destroyed
28
What is composition?
Objects associated with composition, if the containing object is destroyed the associated object is also destroyed.
29
What is Encapsulation?
Method of bundling attributes and methods together within a class
30
What is inheritance?
Subclasses inheriting methods of and attributes of its parent class
31
What is instantiation?
Creation of an object from a class
32
What is overriding?
Redefinition of a method in a subclass
33
What is polymorphism?
Objects of different classes using the same method to perform an action.
34
What are the principles of OOP?
- Favour composition over inheritance - Encapsulate what varies - Program to interface, not implementation.
35
What are dictionaries?
Data structure consisting of a set of keys mapped to corresponding values.
36
What is an adjacency list?
Representation of a graph by storing a list of connected nodes to each node
37
What is an adjacency matrix?
Representation of a graph which stores edges connecting possible nodes.
38
What is convex combination of 2 vectors?
Any vector which can be expressed as a linear combination of the two vectors
39
What are dot / scalar products of two vectors
Sum of components with the same index of the 2 vectors
40
what is scalar-vector multiplication?
Operation which multiplies all components of a vector by the same scalar quantity
41
What is vector addition?
Operation which adds 2 vectors resulting in another vector as the output.
42
State the Big O time complexities.
O(1) - Constant O(log n) - Logarithmic - Binary search O(n) - Linear - Linear search O(n log (n)) - Loglinear - Merge sort O(n^2) - Polynomial - Bubble sort O(2^n) - Exponential
43
What are algorithms?
Sequence of steps taken to complete a task
44
What is abstraction by generalisation?
Simplifying a problem by grouping together common characteristics of a problem.
45
What is representational abstraction?
Simplifying a problem by only considering necessary details.
46
What is procedural abstraction?
Simplifying a problem by breaking it down into a series of reusable functions to produce a procedure
47
What is data abstraction?
Storage and representation of data in a computer system.
48
What is decomposition?
Breaking down a problem into sub-problems.
49