> 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.md).

# Object Oriented Programming

{% embed url="<https://www.youtube.com/watch?index=13&list=PLhQjrBD2T3817j24-GogXmWqO5Q5vYy0V&v=e4fwY9ZsxPw>" %}

**Object Oriented Programming (OOP)**

* Programming practice to design modular reusable software systems
* OOP designs programs with creation of Objects
* An approach that focuses on the definition of data rather than the input → processing → output logic (OOP vs procedure-oriented programming)
* The goal is to create an object that we can define and provide functionality to solve problems

{% hint style="info" %}
“OOP focuses on how to ***manipulate the data of the object*** rather than the logic required to manipulate them”
{% endhint %}

## Procedural vs OOP

{% tabs %}
{% tab title="Procedural Programming" %}
Focuses on

* Calculations
* Logical Evaluations
* Complete Repetitive tasks
* Databases
  {% endtab %}

{% tab title="OOP" %}
How to describe the data:

*Example: A human*

* What’s their name?
* What’s their address?
* What functions can this object have?
  {% endtab %}
  {% endtabs %}

**Object:** A combination of data and functional code. This is because real-world objects have states and behaviour.

**States:** The characteristic, Measurable data of an object

**Behaviour:** The available functionality of the object (what can it do?)
