Intro to OOP:
- Just what is OOP?
- Object Oriented Programming thats what.
- Ok but whats the big deal
- Well when used right it keeps you from repeating code. And keeping your code more organized
4 Pillars of OOP
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
Encapsulation:
- Where we keep our code grouped together into objects.
- We use classes to define what the objects are and how they will behave buy encapsulating attributes and methods in our class
Inheritance:
- Where we pass attributes and methods from one class to a sub-class or child class.
Polymorphism:
- Here is where we can have a different version of a method in the child class from the parent class
Abstraction:
- This is an extension of Encapsulation
- It is where we can create a new class that has a more clean look because we hide things that it doesn't need to know.
Link to code: