I was once asked what this was and to my surprise was not able to answer in my own words. So here's another blog to document my learning!
Object-Oriented Programming (OOP) sounds like a can of worms but not something that sounds too impossible to understand.
Here is what I learnt and understand from the four pillars of OOP:
Abstraction - automate the implementation of code across the code base by abstracting away the logic of code.
Encapsulation - hiding data from a specific place so that other places of the code can't use it. This prevents 'spaghetti' code if everything was made 'global'.
Inheritance - allowing an object to receive the same properties or likeness from it's parent object E.g. sharing the same property.
Polymorphism - where types in the inheritance chain can do different things
That's it!
Would you agree? Comment below for your thoughts :)
Top comments (0)