Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Tell me real world example of polymorphism and encapsulation .

Answer Posted / nagaraj

polymorphisms:-
polymorphisms is nothing but ability to take more than one forms(One Interface,Multiple Methods or One Name,Many Forms).

Encapsulation:-
-is nothing but wrapping the data and functions into single entity.

Inheritance:-
The Process of deriving new class from existing class.This is called Inheritance.
New Class-Child Class
Existing Class-Parent Class


Polymorphism:

say a door..
a door to a temple, a door to a house, a door to a kitty house,
all are doors, but all look different

Encapsultion:

cars and owners...
all the functions of cars are encapsulated with the owners..
No one else can access it...

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why quicksort is called quick?

959


How to reverse a singly linked list?

1106


Is it possible to make an array volatile in java?

982


Write a Program for Insert in a sorted list

969


an array t[100] which contains numbers between 1..99. Return the duplicated value. Try both O(n) and O(n-square).

957


Define double hashing?

1005


Which interface provides the capability to store objects using a key-value pair?

1163


what is a balanced tree.

1047


How is any data structure application is classified among files?

1104


What is the idea behind splaying?

1838


What are skew trees? For a tree with 4 nodes draw all possible binary? Generalize for n nodes how many binary trees can be drawn?

1076


Define the term “percolate up”?

1003


What is a node in it?

992


How are elements stored in hashset?

1012


What do you mean by collision in hashing?

1019