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 is Linked lists?

988


What is data and data structure?

954


Why is sorting important?

878


Give a good data structure for having n queues ( n not fixed) in a finite memory segment. You can have some data-structure separate for each queue. Try to use at least 90% of the memory space.

946


Is json a data structure?

938


Why hashmap is faster than hashset?

1003


Which process places data at the back of the queue?

1146


in tree construction which is the suitable efficient data structure? (Array, linked list, stack, queue)

1260


What are the advantages of merge sort?

843


Write a code for dynamic allocation of array.

1056


What is stack and its operations?

857


Does hashmap preserve insertion order?

886


Explain linear linked implementation of Stack and Queue?

1069


What is dynamic array in excel?

894


What is ds tree?

908