Home > Java, Perl, Python > OOP Concept

OOP Concept

Brief Introduction to OOP
Object Oriented Programming or OOP is the technique to create programs based on the real world. Unlike procedural programming, here in the OOP programming model programs are organized around objects and data rather than actions and logic. Objects represent some concepts or things and like any other objects in the real Objects in programming language have certain behavior, properties, type, and identity. In OOP based language the principal aim is to find out the objects to manipulate and their relation between each other. OOP offers greater flexibility and compatibility and is popular in developing larger application. Another important work in OOP is to classify objects into different types according to their properties and behavior. So OOP based software application development includes the analysis of the problem, preparing a solution, coding and finally its maintenance.

Java is a object oriented programming and to understand the functionality of OOP in Java, we first need to understand several fundamentals related to objects. These include class, method, inheritance, encapsulation, abstraction, polymorphism etc.

Class – It is the central point of OOP and that contains data and codes with behavior. In Java everything happens within class and it describes a set of objects with common behavior. The class definition describes all the properties, behavior, and identity of objects present within that class. As far as types of classes are concerned, there are predefined classes in languages like C++ and Pascal. But in Java one can define his/her own types with data and code.

Object – Objects are the basic unit of object orientation with behavior, identity. As we mentioned above, these are part of a class but are not the same. An object is expressed by the variable and methods within the objects. Again these variables and methods are distinguished from each other as instant variables, instant methods and class variable and class methods.

Methods – We know that a class can define both attributes and behaviors. Again attributes are defined by variables and behaviors are represented by methods. In other words, methods define the abilities of an object.

Inheritance – This is the mechanism of organizing and structuring software program. Though objects are distinguished from each other by some additional features but there are objects that share certain things common. In object oriented programming classes can inherit some common behavior and state from others. Inheritance in OOP allows to define a general class and later to organize some other classes simply adding some details with the old class definition. This saves work as the special class inherits all the properties of the old general class and as a programmer you only require the new features. This helps in a better data analysis, accurate coding and reduces development time.

Abstraction – The process of abstraction in Java is used to hide certain details and only show the essential features of the object. In other words, it deals with the outside view of an object (interface).

Encapsulation – This is an important programming concept that assists in separating an object’s state from its behavior. This helps in hiding an object’s data describing its state from any further modification by external component. In Java there are four different terms used for hiding data constructs and these are public, private, protected and package. As we know an object can associated with data with predefined classes and in any application an object can know about the data it needs to know about. So any unnecessary data are not required by an object can be hidden by this process. It can also be termed as information hiding that prohibits outsiders in seeing the inside of an object in which abstraction is implemented.

Polymorphism – It describes the ability of the object in belonging to different types with specific behavior of each type. So by using this, one object can be treated like another and in this way it can create and define multiple level of interface. Here the programmers need not have to know the exact type of object in advance and this is being implemented at runtime.

Ref: http://www.rindia.net/

Tags: , , ,
  1. December 20, 2012 at 4:53 AM

    An on-page optimiser will ensure how the meta tags are keyword optimised in order that the client website gets maximum mileage from your SEO services.
    Some with the professional SEO services that
    will be supplied by the SEO company are mentioned below:.
    The services packages of those SEO companies in Montreal vary about the basis of the service they render.

  2. January 10, 2013 at 7:33 PM

    If you are going for most excellent contents like I do, simply go to see
    this site everyday for the reason that it presents feature contents, thanks

  3. January 29, 2013 at 5:21 AM

    You actually make it seem so easy with your presentation but I find this matter to be really something that I think
    I would never understand. It seems too complicated and very broad for me.
    I’m looking forward for your next post, I will try to get the hang of it!

  4. January 30, 2013 at 7:09 PM

    I drop a leave a response each time I like a article
    on a site or I have something to add to the discussion. It is triggered by the fire communicated in the post I read.
    And on this post OOP Concept « D.i.W.T.. I was excited
    enough to post a leave a responsea response 😉 I do
    have some questions for you if you don’t mind. Is it only me or do a few of these comments come across like left by brain dead individuals? 😛 And, if you are posting at other online social sites, I would like to follow anything new you have to post. Would you list all of all your community sites like your linkedin profile, Facebook page or twitter feed?

  5. January 31, 2013 at 9:27 AM

    Heya i’m for the primary time here. I came across this board and I in finding It truly useful & it helped me out a lot. I am hoping to provide something again and help others like you helped me.

  6. February 1, 2013 at 12:57 PM

    Hey I am so grateful I found your webpage, I really found you by error, while I was browsing on Google for something
    else, Nonetheless I am here now and would just like to say
    thanks a lot for a fantastic post and a all
    round interesting blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent work.

  7. July 31, 2013 at 12:31 AM

    Hi. A really nice and useful post for all programmers. I learned a lot from this. I also have a python blog. Make sure you check it out.
    freepythontips.wordpress.com

  1. November 11, 2011 at 12:30 AM

Leave a reply to homepage Cancel reply