Java SE 8 and JDK 8 Launched.For Download:Click Here!


Social Icons


Saturday, 14 September 2013

Object Oriented Programming Features

     As we discussed before in the Features of Java , the object oriented concepts came into the picture.In this part , we will discuss that concepts in detail.             
    The object oriented programming (OOP) paradigm express computer programs in ways how people perceive the world , which is as objects.

   Firstly, we will recall the concepts of Object Oriented Programming Language(OOP ) , as disussed earlier in our Features of Java post.

Fundamental Concepts of Object Oriented:
7.Message Passing

  • Class is a user defined data type.
  • It is a fundamental packaging unit of OOP technology.
  • Class can be defined as a template/blue print that describes the behaviors/states that object of its type support.

  • An Object is a real time entity.
  • In other words , an object is an independent software entity with logically combined data and functions.
  • Real-world objects share two characteristics :  They all have state and behavior.    Dogs have state (name, color) and behavior (barking, wagging tail).
  • An object is an instance of class.

  • The mechanism of binding the code and the data it manipulates and keeping both safe from outside interference is called as encapsulation.
  • In other words , the wrapping up of data and its functions into a single unit is called Encapsulation.

  • Abstraction refers to the act of representing essential features without including the background details or explanation between them.
  • Abstraction is one of the key principles of the OOAD(Object oriented analysis and Design).
  • For example , a mobile phone has various features like sms,calling,music player,camera,etc. You don't need to know how this things work internally , you directly use it.This is possible because of abstraction.

    Note:It can be said that Encapsulation is the Bodyguard and Abstraction is VIP.

  • Inheritance is the concept by which the properties of one class are made available to another.
  • It allows the new classes to be built from the older instead of being rewritten from scratch.
  • The concept of inheritance provides the idea of reusability and extensability.

  • Polymorphism is a Greek term where poly means many and morph means form.
  • It simply means 'one name multiple forms'.
  • The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.

Message Passing
  • A message for an object is a request for execution of a procedure , and therefore will invoke a function (procedure) in the receiving object that generates the desired result. 
  • Objects can send or receive message or information.
  • Message passing involves name of object, name of function (message) and information to be send.
  • For example, student.mark(name) .  Here student is object, mark is message, name is information.

  • Object Oriented programs are built from reusable software components.
  • Reusability is nothing but re- usage of structure without changing the existing one but adding new features or characteristics to it. It is very much needed for any programmers in different situations.
  • Also , as discussed above in the inheritance concept , reusability is acheived through inheritance.
Comment With:
The Choice is Yours!

No comments:

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks

Follow JavaCompile by Email

Related Posts Plugin for WordPress, Blogger...

Total Pageviews


Blogger Widgets