Fundamental principles of OOP

In this tutorial we will start learning about the object oriented programming principals. These principles make the foundation of the complete object oriented programming theory. Each and everything which you will do using any object oriented programming language will be using one of these principles.

The whole object oriented programming is based on the following core principles

  1. Class
  2. Object
  3. Encapsulation
  4. Data hiding
  5. Polymorphism
  6. Inheritance
  7. Overriding
  8. Abstraction

Each of them has a very important role to play in object oriented programming. To make it simple for you to understand these principles let me divide them into two groups.

  1. Class
  2. Object

  3. Encapsulation
  4. Data hiding
  5. Polymorphism
  6. Inheritance
  7. Overriding
  8. Abstraction

We have kept class and object in one group and rest of the principles in a separate group. Why? Because in object oriented programming you start from a class and end at the object. For example when building a house you start with a plan and end with the actual house fully constructed. So class and object mark the starting and ending of the object oriented programming journey.

The principles in the second group are the rules which you have to follow while creating your classes. All these rules apply to a class, not to the object. Object is just an instance of the class. You have to follow these rules while you are writing the code for your class. For example while creating the plan for a house you will follow all the rules like to take care of proper ventilation in the house, proper lighting, proper water supply and electricity supply to each room etc. While constructing the house you will just follow the plan. If you have not marked any windows for your room in the house plan then there will be no windows in the room after the construction is complete. It’s simple logic.

So keep in mind the all rules have to be followed while writing your classes. We will explain each of the above principles in the next tutorials.

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp