Classes and Objects Flashcards
1
Q
Object Oriented Programming (OOP):
A
2
Q
Objects
A
- Objects are made out of attributes and methods.
3
Q
Classes
A
- We use classes to create objects.
- Classes define the properties (attributes) and behaviors (methods) that the objects share.
- Classes consist of objects, and objects are made up of attributes and methods.
- Think of classes as blueprints, and objects as instances created from the blueprints.
4
Q
Attributes
A
Attributes represent the properties of the object, like the name, the color, etc.
5
Q
Methods
A
Methods represent functionality or tasks that the object can do
6
Q
Instance
A
- Another name for an object. When you create an object from a class, you say you’re creating an instance of that class.
7
Q
__init__() Method
A
8
Q
Self Parameter
A
9
Q
OOP Principles
A
10
Q
A