Design a class named Quadratic Equation for a quadratic equation ax2+bx+x=0. The class contains:...1 answer below »

Design a class named Quadratic Equation for a quadratic equation ax2+bx+x=0. The class contains: private data fields a, b, and c that represents three coefficients. a constructor for the arguments for a, b, and c. three get methods for a, b, and c. a method named get Discriminant() that returns the discriminant, which is b2-4ac the methods named getRoot1() and getRoot2() for returning two roots of the equation, or returning 0 if the discriminant is negative. Write a test program that prompts the user to enter values for a, b, and c and displays the roots. If no roots for the equation, display "The equation has no roots."

## 1 Approved Answer

May 12, 2021## Do you need an answer to a question different from the above? Ask your question!

Tell us more

(Hide this section if you want to rate later)

Was the final answer of the question wrong?

Were the solution steps not detailed enough?

Was the language and grammar an issue?

Does the question reference wrong data/report

or numbers?

Stay Solved :)

5 seconds## Didn't find yours?

Ask a new questionGet plagiarism-free solution within 48 hours

Review Please