General Notes

Object Oriented Programming (OOP)

  • Class: A blueprint or template that defines the structure and behavior (attributes and methods) of objects.
  • Object: An instance of a class.
  • Attributes/Properties: Variables that store data or characteristics of an object.
  • Methods: Functions defined inside a class that describe the object’s behavior.
  • Instance: A specific, individual object created from a class.
  • Encapsulation: Bundling of data and methods into a single unit (class) and restricting direct access to data using access modifiers (like private or public).
  • Getters and Setters: Methods used to access (get) or modify (set) private attributes.
  • Inheritance: The mechanism that allows one class child to inherit attributes and methods from another parent.
  • Polymorphism: The ability of methods to behave differently based on the object calling them, usually through method overriding or overloading.
  • Containment (Aggregation): When a class contains objects of another class as part of its data (a “has-a” relationship).

PYTHON

Python can be executed directly in the browser.

Editor — Python
Output
No output yet.