Ads Sponsored By Google :)

Monday, 22 July 2013

Java OOPs Concepts with Real Time Examples

Java OOPS Concepts with Examples, Java OOPS Concepts with Real time examples, Java OOPs Concepts with real time examples in pdf format.

Java Object oriented programming concepts with real time examples 
OOPS Concepts are mainly 4


Abstraction:- Hiding un neccessary Details or features but exposing only essential details or features.
                       Covering or Hiding unnecessary data from the users details,is called abstraction.

Real Time Example :

Hiding Unneccessary data from the user is called an Abstraction

In Real Time if we consider the TV Remote or Computer or laptop Keyboard has Buttons in Structured format,those are only visible to us. But
Hard ware materials like Inner Ciruit, Device all are invisible in same manner Abstraction will work.

Encapsulation : The process of binding or making unit the data and the codes that operates on the data into a single entity.
That keeps the data in safe manner from outside of the interface and also to avoid misuse.

Best feature to think about encapsulation is better way to prevents the data as a protective wrapper
that prevents to access the code randomly accessed by other code that is defined at outside the wrapper.

Real Time Example: 
1) If We Consider the Ink is the important component in pen but it is hiding by some other material.

2)Consider the Medical Tablet in which one drug is stored in bottom layer and another drug is stored in Upper
layer these two layers are combined in single Tablet.

The Process of inheriting the characters or features from one class to its sub class is called inheritance.

Real Time Example:
1. Father and Son Relationship, Grandfather and GrandSon etc...
Technical Example :
Particular Technology is updating day to day, by enchancing the features.

Single Form can be exhibited in multiple forms or situations. Even in Technically Ascept
One function can exhibit multiple charactes by using Overloading or Overriding.

Real Time Example:
Consider a Women plays housewife role at her home, at same time she plays employee/ manager role at her office.

 Consider another  Person will play
          a) Plays Parent Role with his/her children
          b) Plays Employee or Job Role at his/her Office or Company.
          c) Plays Public Citizen role.

Object Oriented Programming Principles

No comments:

Post a Comment