Question: Create a GUI application: please me working java program only. The quadratic equation ax2 + bx + c = 0 is given by: x1, x2

Create a GUI application: please me working java program only.
The quadratic equation
ax2 + bx + c = 0
is given by:
x1, x2 = -b sqrt(b2 -4ac)
2a
If disc = b2 -4ac then you can take the square root, using Math.sqrt(b2 -4ac)
Write a program that will use a dialog box to input a, b, and c. If disc is 0 or greater, it will print :
Real Solutions
X1 = ..
X2 = ..
If disc
If you want to show off, you can make the following modifications:
**********all answers are to be to 4 decimal places ************
a) Printout the equation with the values;
For example The solution for 3x2 + 5x + 2 = 0 is:
b) Print out the complex solution as
X1 = ### + ###i
X2 = ### - ###i
c) Avoid print outs that have + - when either b or c are negative
d) If b or c are 0 then omit that term
Examples 3x2 + 2 not 3x2 + 0x + 2
x2 + 2x not x2 + 2x + 0
Same for the I x1 = ### + i not x1 = ### +1.0i
e) While I did not do it in my demo program, if a or b are 1 then print
x2 or x instead of 1.0x2 or 1.0x
f) If disc is 0 then print out Double real solution x = ######
 Create a GUI application: please me working java program only. The
Quadrati. Enter a value for A. 1 Enter a value for B, 2 Enter a value for C. 3 | Click to solve Solution: There were 2 imaginary results x= -1.0 + 1.414t x 1.0-1.414

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!