Can any one tell me the real example for
polymorphism.
Real example in the sense, we have to tell the example to some non computer science persons.
Encapsulation is nothing but wrapping of data and method into single
unit. This definition for only us. But i wanna explain, what is meant by encapsulation to someone who is not in a computer science background.
How can i tell ??
Here this is explanation
Encapsulation is like, Tube Tablets (capsules). Tablets which covered by tube. It contains some medicines, which wraps some medicine.
Did you got that what am trying to say.
Think of a class as a vehicle. An object as a lorry or car or
rocket.
A class is like a collection of objects. A lorry is an object, so is a car and a rocket too. But all of them are vehicles.
Likewise how can we give these kind of explanations for polymorphism ???