Question: The software I use is Eclipse, please TEACH me how to write it if possible, thanks. Design a class named QuadraticEquation for a quadratic equation
The software I use is Eclipse, please TEACH me how to write it if possible, thanks.

Design a class named QuadraticEquation for a quadratic equation ax2 + bx + c = 0.The class contains 1. Private data fields a, b, and c that represents three coefficients. A constructor with the arguments for a, b, and c Three getter methods for a, b, c. [getter are the methods which help access the private data fields] A method named getDiscriminant0 that returns the discriminant, which is b2 -4ac The method named getRoot10 and getRoot20 for returning two roots of the equation -4ac -b-b2-4ac and r2 - 2a 2 a These methods are useful only if the discriminant is nonnegative. Let these methods return 0 if the discriminant is negative Write a test program that prompts the user to enter values for a, b, and c and display the result based on the discriminant. If the discriminant is positive display the two roots, if the discriminant is 0, display the one root. Otherwise, display "The equation has no roots." Note: you can use Math.pow(x, 0.5) to compute vx Here is the sample run: Enter a, b,c: 1.0 31 The equation has two roots -0.381966 and - 2.61803 Enter a, b,c: 12.0 1 The equation has one root -1.0 Enter a, b,c: 123 The equation has no real roots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
