Question
Write a JavaFX GUI application that works with 2 nd Order Polynomials: f(x) = ax 2 + bx + c and the quadratic formula: roots
Write a JavaFX GUI application that works with
2nd Order Polynomials:
f(x) = ax2 + bx + c
and the quadratic formula:
roots = -b b2 4ac
----------------
2a
The starting GUI looks as follows: Show Equation will display the equation in a
label:
Evaluate for x will compute f (x): Find Roots will show the roots computed using the quadratic formula:
The Clear button will reset the GUI to its start position. The Exit button will stop the application.
The f(x) text field and Roots text fields should only appear when they are computed. The equation should only be displayed if the Show Equation button is clicked. If the roots are imaginary, the phrase Imaginary Roots should be displayed in the Roots text field. If there is only one root, the root along with a phrase indicating (one root) should be displayed in the Roots text field. The user should not be able to type into the f(x) and Roots fields.
To hide a label or field:
object.setVisible (false);
The placement of GUI elements and equation text should look at least as nice as in this handout.
Values are all double type.
Quadratic Equation Show Equation Find Roots Evaluate for xClear Exit Quadratic Equation Show Equation Find Roots Evaluate for xClear ExitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started