Word Drills - Object-Oriented Flashcards

1
Q

Tell Python to make a new type of thing

A

Class

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

Two meanings: the most basic type of thing, and any instance of some thing.

A

object

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

What you get when you tell Python to create a class

A

instance

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

How you define a function inside a class

A

def

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

Inside the functions in a class, self is a variable for the instance/object being accessed.

A

self

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

The concept that one class can inherit traits from another class, much like you and your parents

A

inheritance

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

The concept that a class can be composed of other classes as parts, much like how a car has wheels.

A

composition

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

A property classes have that are from composition and are usually variables

A

attribute

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

A phrase to say that something inherits from another, as in a “salmon” is-a “fish.”

A

is-a

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

A phrase to say that something is composed of other things or has a trait, as in “a solmon has-a mouth.”

A

has-a

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