Elements of OOP: Extendibility and Reusability of OOP Paradigm 1.11
Overloaded function decides which version of the code is to be loaded into primary
memory depending on the argument supplied by the user.
Why is overloading important? Functions have to compiled and loaded into primary mem-
ory. If a function is NOT overloaded, all the functions have to be loaded and linked at compile
time itself. The user may or may not use all the function loaded, thus wasting the primary mem-
ory and making it unavailable to solve complex problems requiring more primary memory.
As an example, consider the following overloaded function:
// single argument. Same function name
public void FindArea( float r ){ return ( 2*3.14158*r*r ) ; }
// two argument same name. ...