Can a class possibly contain both of the following method definitions?
/**
Postcondition: Returns the integer portion of a
positive number or zero if the number is negative.
*/
public static int convertValue(double number)
{
int result = 0;
if (number > 0.0)
result = (int)number;
return result;
}
public static double convertValue(int number)
double result = 0;
result = (double)number;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here