Question: Please use Java Problem 1. Solve Quadratic Equations (QuadraticRoot.java) The two roots of a quadratic equation ax? +bx+c = 0 can be obtained using the

Please use Java
Please use Java Problem 1. Solve Quadratic Equations (QuadraticRoot.java) The two roots

Problem 1. Solve Quadratic Equations (QuadraticRoot.java) The two roots of a quadratic equation ax? +bx+c = 0 can be obtained using the following formula: -b + b2 - 4ac r1 = 2a -b-b2 - 4ac r2 = 2a b2 - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation has two real roots. If it is zero, the equation has one root. If it is negative, the equation has no real roots. Write a Java class named QuadraticRoot that prompts the user to enter values for a, band c and displays the result based on the discriminant. If the discriminant is positive, display two roots. If the discriminant is 0. display one root. Otherwise, display "The equation has no real roots. Outputs: Please enter a, b, c: 1.0 31 The equation has two roots: 6.381966 and -2.61883 Please enter a, b, c: 1 2.0 1 The equation has one root: -1 Please enter a, b, c 1 2 3 The equation has no real roots Problem 2. Random Month (RandomMonth.java) Description Write a Java class named Random Month that randomly generates an integer between 1 and 12, and displays the English month name January, February, March.... December for the number 1. 2. 3...12 accordingly. You are required to use the switch statement to do this job. Outputs: The random number generated is 7 The corresponding month is july. The random number generate is 12 The corresponding month is December

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!