Consider the following incomplete method, which is intended…
Consider the following incomplete method, which is intended to return true if the value of y is between the values of the other two parameters and false otherwise. /** Precondition: x, y, and z have 3 different values. */public static boolean compareThree(int x, int y, int z){ return /* missing condition */ ;} The following table shows the results of several calls to compareThree. compareThree Table Call Result compareThree(4, 5, 6) true compareThree(6, 5, 4) true compareThree(5, 4, 6) false compareThree(3, 4, 4) violates precondition Which of the following can be used to replace / * missing condition * / so that compareThree will work as intended when called with parameters that satisfy its precondition?
Read Details