Lesson 13 Flashcards

1
Q

Object Oriented Programming OOP

A

OOP is a programming concept developed in the 1960/ and broadly supported in major languages starting in the 1980s
Based on the idea of defining a customized software object that has properties and functionality

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

Classes

A

A class is the description or definition of the attributes and methods that an object of that class has. We use the class keyword to begin a class

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

__init__

A

Init is a function that initializes an object attributes.
It is automatically called when an instance is created
Its first argument is always self but it contains additional arguments

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

Self

A

Is used to access an instance’s attributes or methods.
Without the use of self an attribute could be shared by all instances of a class

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

Inheritance

A

Inheritance allows us to create classes (called child or derived classes) that inherit the attributes and methods from another class (called the parent or base)

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

Polymorphism

A

The same method name is used in multiple classes. For example len()
- a childs method overrides the parents in the case of a name conflict. When using a method, the one that is called is the one that is defined within the instances class.

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

Operator overloading

A

Operator overloading refers to overriding the behavior of standard operators, such as plus or minus.

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