WorksheetsObject Oriented Programming
Total questions: 9
Worksheet time: 5mins
A blueprint which can be used to create an object. Contains methods and variables.
Constructors
Classes
Objects
Properties
A child class gains methods and properties from the parent class.
Inheritance
Objects
Attributes
Methods
A special kind of attribute. Has a "getter" (__get__), a "setter" (__set__), and "delete" (__delete__) method.
Objects
Properties
Methods
Attributes
Created when a new object is instantiated and isn't available to other objects. They are accessible by methods but declared outside methods.
Instance Variable
Methods
Inheritance
Classes
Used in objects to hold data. They are similar, but different, from a variable.
Class Variables
Objects
Attributes
Constructors
A special method that Python uses to instantiate an instance or object. They assign values to instance variable, and are always named "__init__()"
Instances
Attributes
Constructors
Methods
Created inside a class but outside any methods. Can be changed by calling the class variable, but changes may impact all places that the variable is used.
Methods
Constructors
Instance Variables
Class Variables
Functions available only to objects of that type. Defined within the class and perform some actions that are helpful to that specific type of object.
Classes
Inheritance
Constructors
Methods
An object recreated by following the "blueprint" defined by the class. It "inherits" the methods and variables from the class it was created from, however the data may be different.
Objects
Properties
Instances
Attributes
