D.2.6 Explain the advantages of polymorphism.
Same interface could be used for creating methods with different implementations
Reduces the volume of work in terms of distinguishing and handling various objects
Supports building extensible systems
Complete implementation can be replaced by using same method signatures
Method overloading allows methods that perform similar or closely related functions to be accessed through a common name.
Method overloading allows you to define three methods with the same name and different types of parameters to handle different operations.
Method overloading can be implemented on constructors allowing different ways to initialize objects of a class. This enables you to define multiple constructors for handling different types of initializations.
Method overriding works together with inheritance to enable code reuse of existing classes without the need for re-compilation.
Method overriding allows a sub class to use all the general definitions that a super class provides and add specialized definitions through overridden methods.