Question: /** * The quadratic formula returns the solutions to the equation ax^2 + bx + C = * 0. The quadratic formula is on page

/** * The quadratic formula returns the solutions to the equation ax^2 + bx + C = * 0. The quadratic formula is on page 99, problem 3.1 in the Programming * Exercises. Compute the descriminant which is b squared minus 4 times a * times c. If the descriminant is negative, then display "The equation has no * real roots" If the descriminant is zero, then display "The equation has one * root r1". If the descriminant is positive, then display "The equation has * two roots r1 and r2" * * @param a * @paramb * @param c * @return public static String getQuadraticRoots(double a, double b, double c) double root1 = 0.0; double root2 = 0.0; return "Not the answer " + root1 + root2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
