1K Blog Marathon: Day 52
What is OOP?
Technically speaking, Object-Oriented Programming is a type of software programming where in the code is based on the “objects” or group of functions and variables, rather than logic. When we say object, we mean data fields with unique properties.
OOP allows the programmer to define a data type of a data structure. The programmer can also define the functions to be used. This type of programming is highly usable when it comes to a large project, often created with many functions.
Class
This defines how the data is formatted, much like an instruction manual for procedures.
Objects
This is the instance of the class.
4 Concepts of OOP
1. Encapsulation
2. Abstraction
3. Inheritance
4. Polymorphism
Encapsulation
This concept says that the data, variables and functions are “Encapsulated” and safe from outside intervention. It is very useful when protecting and storing confidential data against misuse.
Encapsulation combines elements and reuse it, thus saving development time.
Abstraction
This means displaying non-important information, while hiding the detail of a function. This is of much help when transferring confidential things, secure and safe.
Inheritance
Just like a real life inheritance, where a wealth is passed down to the heir. OOP under this principle states that characteristics and classes can be a passed down or “inherit” by the other classes.
Polymorphism
Also known as “subtyping”, this principle states that there are multiple forms that a data could have. This multiple forms created a way for the program to process objects with different forms.
https://www.youtube.com/watch?v=pTB0EiLXUC8
“And that’s one blog, stay hungry!”
“All objects exist in a moment of time.”
Amy Tan