Understanding Object-Oriented Programming

Object-Oriented Programming is basically this way of coding where you create a small box - parent class and child classes which all contain small box and more. This implies that child classes posses everything that is contained inside of the smaller boxes, but may contain more. So child classes inherit all of the properties from the parent class but may have their individual properties separate from the parent class. The purpose of OOP is to make our life easier by not creating multiple objects but rather child classes with shared properties and unique ones.

The main principles which we've talked about:

Mini Interaction:

Below is a small demo showing OOP in action. Each animal is a child object created from a parent class. Click the buttons to make them behave differently

adventurous flamingo tractors