Question: In java please a. Using UML notation, design a class called QuadraticEquation in Microsoft Word to represent a quadractic equation ax2+bx+c=0 The class contains: a.

In java please

In java please a. Using UML notation, design a class called QuadraticEquationin Microsoft Word to represent a quadractic equation ax2+bx+c=0 The class contains:a. Three private double data fields a,b and c to store coefficient

a. Using UML notation, design a class called QuadraticEquation in Microsoft Word to represent a quadractic equation ax2+bx+c=0 The class contains: a. Three private double data fields a,b and c to store coefficient of each term of a quadratic equation. b. A constructor with arguments for a,b and c. c. 3 public getter methods to return each value for a,b and c. d. A public method getDiscriminant() to return the discriminant. Formula the discriminant is b24ac e. A public method getRoot1() to return one value of the roots of the quadratic equation. Return 0 if discriminant is negative. f. Another method getRoot2() to return other value of the roots of the quadratic equation. Return 0 if discriminant is negative. Formula for the 2 roots is The roots of a quadratic equation ax2+bx+c=0 are found using x=2abb24acQuadraticFormula Note that in the numerator, there is + and - sign before the square-root sign. So, you can use the + for getRoot1() method and - for getRoot2() method b. Implement your UML design in part (a) above in a Java class. c. Write a test program that will: - Create a QuadraticEquation object and then prompt for a get values for a,b and c - Then display result based on the discriminant. - If discriminant is >0 then display the 2 roots. - If discriminant is 0 then display 1 root. - If discriminant is x2+2x8=0 where a=1,b=2 and c=8 b) x26x9=0 where a=1,b=6 and c=9 c) x2+x6=0 where a=1,b=1 and c=6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!