The QuadraticSolver class calculates solutions for quadratic equations of the form ax^2 + bx + c = 0. For this class:
a, b, and c as parametersboolean method hasSolutions() should identify whether solutions can be calculatedgetSolution1() should return the smaller of the two solutions, if one exists. (If one doesn’t exist, it should return the double value Double.NaN (“not a number”).getSolution2() should return the larger of the two solutions, if one exists. (If one doesn’t exist, it should return the double value Double.NaN (“not a number”).Write a QuadraticSolverTester to demonstrate the capabilities of the QuadraticSolver class.