In functions this can be nice. Let us say we want a function called max() which will return the larger of two numbers. Since parameters for functions must have a particular data type assigned with them (int, float, double, etc.), a function to find the larger integer value could not be used to find the larger float value. If we could not overload functions, we would have to name one something like "maxInt()" and other "maxFloat()". With overloading, we would still need to write multiple functions, but they can all have the same name. Thus when we want to use this function, we just have to remember it is called "max()" no matter what data type is used.
We can also write a function max() to return the larger of two numbers and another function max() to return the largest of three numbers and another function max() to return the largest of four numbers....
You may turn in the assignment to your TA during lab or place it in his mailbox in 905 SEO. It is suggested that you place it in his mailbox just in case you are unable to attend lab. You are to hand in a print out of your program to do the following to your TA.
Create a C++ program that will overload the function min() to allow it to return the smallest of two, three or four numbers. These numbers can be either integers or floating points. Write a driver program that will test out your functions.
Hand in a print out of your program to your TA.