Thursday, July 9, 2009

What are "Real Time" examples? Give same for Inheritance,Polymorphism,Encap... functions in c++?

real time examples means the program used in real world applications

for example a simple project done for inventory control in a medical shop

inheritance-The properties of one class is derived by another class

the class which derives the property is called derived class.

The class from which the properties are derived are called Base class.

ex.The child who derives some behaviors from the parent

ex color,character from parent

polymorphisms-The ability to take more than one forms.

ex.The sum() function can be used to do the following

1.Adds two numbers when integers are passed as parameters

2.Concatenates two strings when strings are passed as parameters.

No comments:

Post a Comment