Introduction to Object Oriented Programming

Introduction to Object Oriented Programming

In this part of the tutorial you will learn 1) What is object oriented programming 2) Why to use object oriented programming 3) Object oriented and JAVA 4) Advantages of object oriented programming What is object oriented programming? In object oriented type of programming we create the objects which has certain properties and the methods (functions) associated with it and we use these methods to perform the operations on the object. The inheritance feature of the object oriented programming form the basis of many coding languages. Object oriented programming includes classes which is an abstract entity, contains properties and methods(functions) associated with it. Classes model the real life objects and they are responsible for decreasing the difference between technical and human concepts of a certain domain. Why to use object oriented programming? The Object Oriented programming decreases the complexity, improves the reader’s understanding for the code and enables easy debugging. The concept of Inheritance, Polymorphism, Encapsulation are the features embedded in the object oriented programming which makes our programming much more flexible, understandable and with much better visibility. So here the concepts are explained. Inheritance: It is the property in object oriented programming in which the features of the parent class are inherited by the child class. Polymorphism: Suppose if a method is written in the parent class, then we can use that method for the child class object without any rewriting of the function but the names must be same. Encapsulation: Using the encapsulation feature of the Object oriented programming we can hide the certain portion of the program from the child class by changing its specifiers (private keyword used) so it cannot use those members of the base class. Object oriented and JAVA JAVA is developed by SUN microsystems and is totally based on the object oriented programming. A class serves as the basic building block of the JAVA code. Even the main of the program is written inside a class. Object oriented programming enables us to have a higher level of abstraction for solving the real life problems. JAVA programming is used for android applications as well. Advantages of Object Oriented Programming: The object oriented programming is relatively close to human nature. Suppose human is a class and it has many instances (objects) like you and me. So by using this sort of programming approach humans can easily understand the concepts of a class and its properties, the better a person understands the methods and attributes of the class, the more he can use its functions efficiently and can modify them accordingly. The Object oriented programming improve the visibility, understanding and the efficiency of the program. It saves us the time but allowing us not to rewrite the code every time. The code made by using object oriented programming can be easily maintained and debugged.

Add new comment