OOP Vocab Flashcards

1
Q

Object

A

An instance of a thing

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

Instance

A

What you get when you tell python to use class blue print to make a thing

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

Self

A

Inside the functions in a class. Self is a variable that holds a space for the instance/object being accessed.

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

Is-a

A

A phrase to say something inherits something from another class

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

Has-a

A

A phrase to say something is composed of other things

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

Class x(y)

A

Make a class named x that is-a y

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

Class x(object): def __init__(self, j)

A

Class x has-a __init__ that takes self & j parameters

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

Class x(object): def m(self, j)

A

Class x has-a function named m that takes self & j as parameters

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

Foo = x()

A

Set foo to an instance of class x

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

Foo.m(j)

A

From foo get the m function & call it with parameters self & j

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

Foo.k = q

A

From foo get the k attribute and set it to q

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

Class

A

Python makes a new type of thing

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