Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribedimage text in transcribed

Evaluate for x will compute f (x): Find Roots will show the roots computed using the quadratic formula:

image text in transcribed image text in transcribed

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 Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. How do they influence my actions?

Answered: 1 week ago