Posted by: zeePa October 13, 2008
Login in to Rate this Post:
0
?
This is small java challenge to all java beginners, and pros. Well i am trying to do it and not yet being able to work it out!
Let me see if you can get it to work...
"Write overloaded Java methods that return the difference of two parameters. Your methods should contain the logic to return the difference of the larger parameter – smaller parameter, regardless of parameter order. Provide enough test code to ensure your methods are logically correct. The following table displays the required method parameter variations.
Parm 1 Type Parm 2 Type Return Type
int int Int
double double double
int double double
double int double
Continue to properly document your source code."
Let me see if you can get it to work...
"Write overloaded Java methods that return the difference of two parameters. Your methods should contain the logic to return the difference of the larger parameter – smaller parameter, regardless of parameter order. Provide enough test code to ensure your methods are logically correct. The following table displays the required method parameter variations.
Parm 1 Type Parm 2 Type Return Type
int int Int
double double double
int double double
double int double
Continue to properly document your source code."