Abstraction:
allowing necessary portions to be visible, hiding the inner workings of a class
Encapsulation:
Wrapping up the methods and attributes of the class within the class
(Example: If it's a VEGGIE wrap...you don't put chicken meat in the wrap. You put it in the MEAT wrap)
Inheritance:
Is when an object acquires the property of another object.
Polymorphism:
Classes that inherit from each other, being able to use the same method and receive a different result.
(Example: There is a kitchen knife, some use it to cut chicken breast, some use it to cut cart boxes)
(These might not be 100% accurate)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What are the four pillars to OOP? What do they do and how might you implement them?
thank you
Abstraction:
allowing necessary portions to be visible, hiding the inner workings of a class
Encapsulation:
Wrapping up the methods and attributes of the class within the class
(Example: If it's a VEGGIE wrap...you don't put chicken meat in the wrap. You put it in the MEAT wrap)
Inheritance:
Is when an object acquires the property of another object.
Polymorphism:
Classes that inherit from each other, being able to use the same method and receive a different result.
(Example: There is a kitchen knife, some use it to cut chicken breast, some use it to cut cart boxes)
(These might not be 100% accurate)