Question: In java programming Write a method called printQuadratic that solves quadratic equations and prints their roots. (Note: Not return, print!) Recall that a quadratic equation

In java programming Write a method called printQuadratic that solves quadratic equationsIn java programming

Write a method called printQuadratic that solves quadratic equations and prints their roots. (Note: Not return, print!) Recall that a quadratic equation is a polynomial equation in terms of a,b and c in the form ax2+bx+c=0. The formula for solving a quadratic is x=2abb24ac Your method should accept the coefficients a,b, and c as parameters and should print the 2 roots of the equation. For this assignment you may assume that the equation has two real roots, though mathematically this is not always the case. Your main program should then test your method with the following two examples. For x27x+12 it should print out x=4,x=3 For 2x2+6x+4=0 it should print out x=2,x=1

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!