Object-Oriented Programming (Definitions) Flashcards

(12 cards)

1
Q

Recall

Types of programming errors

A
  • Logic
  • Syntax
  • Runtime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define

Logic error

A

Affects the evaluation of code logic. (e.g. Inverted sign in conditional statement)

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

Define

Runtime error.

A

When code execution is halted by incorrectly managed code. (e.g. Division by 0 [the compiler cant do shit with jack!!!])

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

Define

Syntax error

A

Incorrect use of programming language conventions. (e.g. misspelling python keywords)

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

Recall

Another name for trace table

A

‘Desk check’.

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

Define

Abstraction.

A

The practice of hiding unnecessary details from other developers (‘users’) to simplify api usage

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

List

Types of function parameters.

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

Define

Reference parameter

A

A pointer parameter.

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

Define

Value parameter

A

A parameter that cannot be directly mutated by a function body.

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

Define

Polymorphism

A

The practice of objects having the same function name, with different behaviours.

e.g. Animal protocol with .sound() function

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

Define

Abstraction

A

The practice of hiding unnecessary details from ‘users’ (other developers) and only showing essential attributes.
e.g. python \_\_function\_\_\_ (private) , _function (protected)

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

Define

Program Control Structure

A

Code that controls flow of execution, e.g., if, switch, while

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