Key words and terms Flashcards

You may prefer our related Brainscape-certified flashcards:
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
Q

What is overiding?

A

When a method has the same name as a method in an inherited class, but with a different implementation.

26
Q

What is association?

A

When 2 objects are described as having a ‘has a’ relationship - car and driver - car has a driver.

27
Q

What is aggregation?

A

When an object is associated with another, it will still exist if containing object is destroyed

28
Q

What is composition?

A

Objects associated with composition, if the containing object is destroyed the associated object is also destroyed.

29
Q

What is Encapsulation?

A

Method of bundling attributes and methods together within a class

30
Q

What is inheritance?

A

Subclasses inheriting methods of and attributes of its parent class

31
Q

What is instantiation?

A

Creation of an object from a class

32
Q

What is overriding?

A

Redefinition of a method in a subclass

33
Q

What is polymorphism?

A

Objects of different classes using the same method to perform an action.

34
Q

What are the principles of OOP?

A
  • Favour composition over inheritance
  • Encapsulate what varies
  • Program to interface, not implementation.
35
Q

What are dictionaries?

A

Data structure consisting of a set of keys mapped to corresponding values.

36
Q

What is an adjacency list?

A

Representation of a graph by storing a list of connected nodes to each node

37
Q

What is an adjacency matrix?

A

Representation of a graph which stores edges connecting possible nodes.

38
Q

What is convex combination of 2 vectors?

A

Any vector which can be expressed as a linear combination of the two vectors

39
Q

What are dot / scalar products of two vectors

A

Sum of components with the same index of the 2 vectors

40
Q

what is scalar-vector multiplication?

A

Operation which multiplies all components of a vector by the same scalar quantity

41
Q

What is vector addition?

A

Operation which adds 2 vectors resulting in another vector as the output.

42
Q

State the Big O time complexities.

A

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
Q

What are algorithms?

A

Sequence of steps taken to complete a task

44
Q

What is abstraction by generalisation?

A

Simplifying a problem by grouping together common characteristics of a problem.

45
Q

What is representational abstraction?

A

Simplifying a problem by only considering necessary details.

46
Q

What is procedural abstraction?

A

Simplifying a problem by breaking it down into a series of reusable functions to produce a procedure

47
Q

What is data abstraction?

A

Storage and representation of data in a computer system.

48
Q

What is decomposition?

A

Breaking down a problem into sub-problems.

49
Q
A