Question: Write overloaded Java methods (four different methods) that return the difference of two parameters. Your methods should contain the logic to return the difference of
Write overloaded Java methods (four different 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 four required method parameter variations.
| Parm 1 Type | Parm 2 Type | Return Type |
| int | int | Int |
| double | double | double |
| int | double | double |
| double | int | double
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
