Object Oriented Programming Concept
Introduction
An OOP concept is a concept in which we try to implement a software into reusable objects.
Here's the wiki definition of OOP;
Here's the wiki definition of OOP;
“Programming paradigm based on the concept of objects, which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.”
There are four Pillars of Object Oriented Programming:
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
1. Abstraction
Abstraction is the concept in which the developer hiding the implementation detail from the user. The user don't really need to know how it work, but they need to be able use it.
2. Encapsulation
Encapsulation is the concept in which we group related methods and all the required data into an object. We encapsulate them together.
3. Inheritance
Inheritance is the concept that we can pass down all the functionality and its data from existing object to a newly crated object.
4. Polymorphism
Polymorphism (from the Greek meaning "having multiple forms"). This is the hardest thing to explain (In my case it's the hardest to understand too). whatis explain it quite well so. I will put it here;
I'm going to demonstrate these concept using C# but if you really understand it, it shouldn't be that hard to using it in other language.
polymorphism (from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning or usage to something in different contextsDon't worry if you still have no idea what these words mean. For now just try to be familiar with these terms as it will continue to pop up as we dig deeper and deeper into the implementation of OOP.
I'm going to demonstrate these concept using C# but if you really understand it, it shouldn't be that hard to using it in other language.
Outline
Reference:
- Object-Oriented Programming Concepts “In Simple English”
- OOP Concepts in C#: Code Examples and How to Create a Class
- ZetCode: C# object-oriented programming
- javatutorial.net/java-oop
- Four Pillars of Object Oriented Programming (OOP)
- whatis:polymorphism
- Favor-composition-over-inheritance
- C# Intermediate – Interfaces in C#
No comments:
Post a Comment