Saturday, November 16, 2013

OOPS explanation (concepts)..10/10

OOPS : (Object Oriented Programming System)

Below are the main OOPS concepts...

Object:
Class:
Abstraction:
Encapsulation:
Inheritance:
Polymorphism:
MessagePassing:

Object:
   - An object represents anything that is really existing in the world. Object exists physically. JVM will allocate separate memory for object. because object is physically exist.

Class:
  - A class is model/idea/blue print for creating Objects. JVM can't allocate memory for class, because class doesn't exist physically.

Abstraction:
  - Hiding unnecessary data from user. [ view is an example for abstraction in oracle].
   Hiding implementation details is called Abstraction.
  advantages:  - It increases security
  - Enhancement is easy
  - Improves maintainability

Encapsulation:
  - Binding of data and methods as a single unit.
  example : class
   advantages:  - we can use the same variables or names in different classes.
   ----- If any class contains DataHiding + Abstraction such type of class is called Encapsulation.
  example: java bean
  advantages:  - It increases security
   - Enhancement is easy
   - Improves maintainability

Inheritance: 
  - Producing a new class from existing class.
  advantages : Re-usability of the code.

Polymorphism:
  - If something exists in several forms is called polymorphism. If same method is performing different tasks it is called polymorphism.

Message passing: 
  - Calling a method in OOPS is called message passing.



No comments:

Post a Comment