Description: The design of a class named QuadraticEquation to two times ax2+bx+c=0 equation. This class includes:
Private data represent three coefficients a, B, C.
A parameter for the construction method of a, B, C.
A, B, C three get method.
A getDiscriminant () method returns the discriminant, b2-4ac.
A getRoot1 () and getRoot2 (two) root method returns.
These methods only in discriminant non-negative number is only useful for. If the discriminant is negative, the method returns 0.
To draw the UML chart. The implementation of this class. Write a test program, prompts the user to input a, B, C value, and then display the results of the discriminant. If the discriminant is positive, showing two root if the discriminant is 0, showing a root otherwise, The equation has no roots "".
To Search:
File list (Check if you may need any files):
Third.class
Third.java