Write a program that prompts the user for two numbers, then prints
The sum
The difference
The product
The average
The distance (absolute value of the difference)
The maximum (the larger of the two)
The minimum (the smaller of the two)
To do so, implement a class
public class Pair
{
/**
Constructs a pair.
\@param aFirst the first value of the pair
\@param aSecond the second value of the pair
*/
public Pair(double aFirst, double aSecond) { . . . }
/**
Computes the sum of the values of this pair.
\@return the sum of the first and second values
*/
public double getSum() { . . . }
. . .
}
Then implement a class PairTester that constructs a Pair object, invokes its methods, and prints the results.