Question: In this lab, you will construct a class called QuadraticSolver that will compute the real roots of a quadratic function (f(x) ax2 bxc). The class

In this lab, you will construct a class called QuadraticSolver that will compute the real roots of a quadratic function (f(x) ax2 bxc). The class will implement the following methods. A default constructor that initializes a legitimate quadratic function. An overloaded constructor that takes the values of a, b, and c in the function f(x) = ax2 + bx +c. This method throws a QuadraticException in the case where the input does not define a quadratic function A method that computes the discriminant (b2-4ac). Boolean methods determining whether the solutions of the quadratic equation ax bx c- 0 have real or non-real solutions. Two methods, one for each real root of the equation ax2 + bx + c = O. Each method will throw a NonRealException when the root is a non-real value. A toString method that (reasonably) prints the quadratic function. . The classes QuadraticException and NonRealException have been provided. Implement a main method in a separate class to test your implementation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
