/Lab_10

Primary LanguageC++

Lab_10

https://github.com/asaeed897/Lab_10/

Polymorphism:

I think polymorphism is having different shapes of an objests, Methods overloading and overriding helps us to take different types of objects(forms). It reduce code and complexibility and increase code reading and understanding.

Virtual function: A virtual function is a member function which we declare in base class and we can re-defined (Overriden) by derived class. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.