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

What do you mean by balance factor of a node in avl tree?

924


State the different ways of representing expressions?

1208


Differentiate between compilers and interpreters.

927


What exactly is a thread?

916


How would you reverse characters of an array without using indexing in the array.

901


What is push and pop in stack?

840


Which sorting is best and why?

899


What does a bubble chart show?

896


State the difference between persistent and ephemeral data structure?

1662


What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

898


How to cut or remove an element from the array?

965


Define indegree of a graph?

1076


What is the easiest sorting method to use in data structures?

1067


What stack means?

917


What are the types of map?

918