What is Overloading Polymorphism?
Overloading allows multiple functions to exist with same name but different parameters. Again if you take bike as an example, it has a function ‘Start’ with two forms ie ‘auto start’ and ‘kick start’. ~ Explain Overriding Polymorphism. Overriding means changing behaviour of methods of base class in derive class by overriding the base class methods. If class A is a base class with method ‘calculate’ and class B inherits class A, thus derives method ‘calculate’ of class A. The behaviour of ‘calculate’ in class B can be changed by overriding it. ~ What are the advantages of OOP? The following are the advantages of OOP: • It presents a simple, clear and easy to maintain structure. • It enhances program modularity since each object exists independently. • New features can be easily added without disturbing the existing one. • Objects can be reused in other program. CareerRide provides answers to questions asked in technical and personal interviews.