Consider the following method.
public class Quadratic {
public static int main(String[] args) {
double a = IO.readDouble();
double b = IO.readDouble();
double c = IO.readDouble();
double disc = b * b - 4 * a * c;
if(disc < 0.0) {
return Double.NaN;
}
if(-b > Math.sqrt(disc)) {
return (-b - Math.sqrt(disc)) / (2 * a);
} else {
return (-b + Math.sqrt(disc)) / (2 * a);
}
}
}
List test cases that test each possible path through this method.
Do not list any two cases that test the same path.