Problems in using the POP(Procedure Oriented programming)
In actual practice procedure oriented programming is good for solving the small problems because most of the code is not reuse further,secondly we don't have to to deal with the complexity of the OOP thirdly we can write a good readable code by using proper modulation.
But Industries,and scientific area and statistical fields we have to deal with large programme having millions of lines of code.
Normally when the size of code is below 10,000 to 12,000 line the programmer have a good grief on their code but whenever the program update additional code added to this and gradually the lines of code increase when its reach 90,000 to 100,000 line a point arise when programmers start to loose the control over the program at that time the program have that much flexibility that it harder for a good professional also to know the actual behavior of the code. secondly the code readability also gradually decrease. That''s why POP is not a good way to write a good code.Humans are evolve to deal with object so if we give this Object oriented approach to program then it will be readable and debug able by anybody.
Advantage of using OOP(Object Oriented Programming)
their are several benefits of using the OOP concept.
#Class and Object concept
#Data Abstaction
#Data encapsulation
#Inheritance
#Polymorphsm
Class and Object :
the entire methodology of OOP is to deal with class and objects.In normal saying class are the the model for creating object and objects are the demonstration of real world or any kind of thing created by the class.It means class are the skeleton of the object.Object have physical significance where class have no physical significance.to understand this concept better take a example
Student is a class it means that any person which have the criteria which are present in the student is called student.let Ram is a person which have these criteria so Ram is also a student.If I ask you to point a student then if you point Ram then this is wrong , why ?? Because you are pointing Ram not a student.Here what i want to tell you that in real world classes have no existence. you can't point out a student,human,person,boy,flower,fruit.or any thing.what you can point is Ram who is a student . yourself who is a human ,mango which is a fruit,lily which is a flower,and so on.
Data Abstaction :
Abstraction means to hide the unnecessary data.In object oriented programming we have a facility call data hiding which means we can hide some specific data or methods from a specific user group,let take a example
let in student class their are some properties like roll,name,class,mark.Here if their is no Data abstraction then student have the same power as the teacher to change some sensitive data.In real world it is not good you know.so what if we made to methods such that one is used for the Data updation and another is simply viewing purpose.and updation is meant for teacher and viewing is meant for student then we can get some kind of security over our data.Over all i mean to say that Abstraction is displaying only the essential details.
Data Encapsulation:
Encapsulation is a way by which the data inside the object behave to be bind together what do you mean by capsule.it means a compact,sealed and detachable container or compartment,right??In just the same way Object are also packed with a lot of variable which are normally the properties of object along with methods which are the functionalities of the object.
Encapsulation isolate the properties and functionalities of a class from the other class.
Inheritance:
Inheritance is a way to create a new class form a old class.by which their is a better readability of the code.and we can make new vlass from a existing class very easily.The old class is called the base class and the new class is called the derive class.the old class is called the super class of the new class and the new class is called the sub class of the old class.many type of inheritance are possible some are like single-Inheritance,multi level inheritance,hierarchical-Inheritance,etc.
Polymorphysm :
the word polymophism come from two Greek letter word "poly" and "morphos".poly means many morphos means form it mean polymorphism means many forms.in programming it is the way to handle multiple object with a single reference by which we can do different task with same functionalities.let take a example
let student and boy are two different class with different functionalities but with same names if the both class inherited from a class name human then by using the reference variable of the human class we can manipulate two different object like student and boy.though the human functionalities are same but by changing the object the execution of the program change.in this way we can manage multiple object at a time two type polymorphism are their one is compile time polymorphism which is normally called the static binding and another is run-time polymorphism which is called the dynamic binding .
In actual practice procedure oriented programming is good for solving the small problems because most of the code is not reuse further,secondly we don't have to to deal with the complexity of the OOP thirdly we can write a good readable code by using proper modulation.
But Industries,and scientific area and statistical fields we have to deal with large programme having millions of lines of code.
Normally when the size of code is below 10,000 to 12,000 line the programmer have a good grief on their code but whenever the program update additional code added to this and gradually the lines of code increase when its reach 90,000 to 100,000 line a point arise when programmers start to loose the control over the program at that time the program have that much flexibility that it harder for a good professional also to know the actual behavior of the code. secondly the code readability also gradually decrease. That''s why POP is not a good way to write a good code.Humans are evolve to deal with object so if we give this Object oriented approach to program then it will be readable and debug able by anybody.
Advantage of using OOP(Object Oriented Programming)
their are several benefits of using the OOP concept.
#Class and Object concept
#Data Abstaction
#Data encapsulation
#Inheritance
#Polymorphsm
Class and Object :
the entire methodology of OOP is to deal with class and objects.In normal saying class are the the model for creating object and objects are the demonstration of real world or any kind of thing created by the class.It means class are the skeleton of the object.Object have physical significance where class have no physical significance.to understand this concept better take a example
Student is a class it means that any person which have the criteria which are present in the student is called student.let Ram is a person which have these criteria so Ram is also a student.If I ask you to point a student then if you point Ram then this is wrong , why ?? Because you are pointing Ram not a student.Here what i want to tell you that in real world classes have no existence. you can't point out a student,human,person,boy,flower,fruit.or any thing.what you can point is Ram who is a student . yourself who is a human ,mango which is a fruit,lily which is a flower,and so on.
Data Abstaction :
Abstraction means to hide the unnecessary data.In object oriented programming we have a facility call data hiding which means we can hide some specific data or methods from a specific user group,let take a example
let in student class their are some properties like roll,name,class,mark.Here if their is no Data abstraction then student have the same power as the teacher to change some sensitive data.In real world it is not good you know.so what if we made to methods such that one is used for the Data updation and another is simply viewing purpose.and updation is meant for teacher and viewing is meant for student then we can get some kind of security over our data.Over all i mean to say that Abstraction is displaying only the essential details.
Data Encapsulation:
Encapsulation is a way by which the data inside the object behave to be bind together what do you mean by capsule.it means a compact,sealed and detachable container or compartment,right??In just the same way Object are also packed with a lot of variable which are normally the properties of object along with methods which are the functionalities of the object.
Encapsulation isolate the properties and functionalities of a class from the other class.
Inheritance:
Inheritance is a way to create a new class form a old class.by which their is a better readability of the code.and we can make new vlass from a existing class very easily.The old class is called the base class and the new class is called the derive class.the old class is called the super class of the new class and the new class is called the sub class of the old class.many type of inheritance are possible some are like single-Inheritance,multi level inheritance,hierarchical-Inheritance,etc.
Polymorphysm :
the word polymophism come from two Greek letter word "poly" and "morphos".poly means many morphos means form it mean polymorphism means many forms.in programming it is the way to handle multiple object with a single reference by which we can do different task with same functionalities.let take a example
let student and boy are two different class with different functionalities but with same names if the both class inherited from a class name human then by using the reference variable of the human class we can manipulate two different object like student and boy.though the human functionalities are same but by changing the object the execution of the program change.in this way we can manage multiple object at a time two type polymorphism are their one is compile time polymorphism which is normally called the static binding and another is run-time polymorphism which is called the dynamic binding .