Answer:
public double max(double m, double n)
{
if (m>=n)
return m;
else
return n;
}
public int max(int m, int n)
{
if (m>=n)
return m;
else
return n;
}
public char max(char m, char n)
{
if (m>=n)
return m;
else
return n;
}
Explanation:
In each of the three methods declarations (Java) above, we are comparing two variables. m and n. The question did not specify what should happen when both variables are the same (i.e. m = =n). We make an assumption and set the condition to be if(m>=n) m should be returned as the greater.