Write a class QuadraticEquation for ax² + bx + c = 0 and a public class QuadraticApp.
The class has three private fields a, b, c set by the constructor (accessors only: an equation does not change), and the methods getDiscriminant() (b² − 4ac), getRoot1(), getRoot2() (each returns 0 when the discriminant is negative) and numberOfRoots() (2, 1 or 0).
main reads triples a b c until the end of the input and prints one line per equation. For the input
1 2 -3
1 2 1
1 2 3
the program prints
a = 1.0, b = 2.0, c = -3.0: discriminant 16.00, two roots 1.000 and -3.000
a = 1.0, b = 2.0, c = 1.0: discriminant 0.00, one root -1.000
a = 1.0, b = 2.0, c = 3.0: discriminant -8.00, no real roots