Design a class named QuadraticEquation for a quadratic equation ax2 + bx + c = 0. The class contains: ■■ Private data fields a, b, and c that represent three coefficients. ■■ A constructor with the arguments for a, b, and c. ■■ Three getter methods for a, b, and c. ■■ A method named getDiscriminant() that returns the discriminant, which is b2 – 4ac. ■■ The methods named getRoot1() and getRoot2() for returning two roots of the equation
These methods are useful only if the discriminant is nonnegative. Let these methods return 0 if the discriminant is negative. Draw the UML diagram for the class then implement the class. Write a test program that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display the two roots. If the discriminant is 0, display the one root. Otherwise, display “The equation has no roots.” See Programming Exercise 3.1 for sample runs.
It has never been easier to place your order. Fill in the initial requirements
in the small order form located on the home page and press “continue” button
to proceed to the main order form or press “order” button in the header menu.
Starting from there let our system intuitively guide you through all steps of
ordering process.
2. PROCEED WITH THE PAYMENT
All your payments are processed securely through PayPal. This enables us to
guarantee a 100% security of your funds and process payments swiftly.
3. WRITER ASSIGNMENT
Next, we match up your order details with the most qualified freelance writer
in your field.
4. WRITING PROCESS
Once we have found the most suitable writer for your assignment, they start
working on a masterpiece just for you!
5. DELIVERY
Once finished, your final paper will be available for download through your
personal dashboard. You will also receive an email notification with a copy of
your paper attached to it. Sometimes, the writer may leave a note for you
about the order in case there is any additional information that they need to
give you.