> For the complete documentation index, see [llms.txt](https://mrparkonline.gitbook.io/guide-to-high-school-computer-science/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mrparkonline.gitbook.io/guide-to-high-school-computer-science/python-programming/python-programming/object-oriented-programming/class-and-objects-definitions.md).

# Class & Objects (Definitions)

## Class

**Class:** An abstract description of all objects that can be made from this set class where an object can be instantiated from.

**A Class Contains:**&#x20;

* **Attributes** --> the characteristics or qualities that an object of the class possesses
  * ***Fields:*** Variables that belong to an object or a class:
    * Type 1: It belongs to the instance of the class
    * Type 2: It belongs to the class itself
* **Methods** --> functions defined within a class; actions that objects of the class can perform

## Object

**In Computer Science (CS):**

Object can be a variable, a data structure, a function, or a method; therefore, a location in memory having a value that can be referenced by an identifier.

**In Object Oriented Programming (OOP):**

Similar to an object as in CS, an object in OOP is an instance of a class where this object can be either a variable, a function, a data structure or a combination of such.

{% hint style="info" %}
An object is an instance of an abstract class.\
\
Example: List is a built-in class of Python.

*When you create a variable containing a list, you have created an object from the **List class.***
{% endhint %}
