Question: CODING IN JAVA In this program, you will generate a series of random numbers and implement methods of the Math class to manipulate these numbers.

CODING IN JAVA

In this program, you will generate a series of random numbers and implement methods of the Math class to manipulate these numbers. Generate three random numbers, variables a, b and c, and store them in three integer variables. The range of the numbers should be from 1-50. Calculate the quadratic formula for the three numbers. The formula is:

Note: You must use Math functions to calculate the square root and the power. //Sample run #1 Because of the random nature of your numbers, your results will be different. The two possible solutions for 13 17 2 are -0.13 and -1.18

//Sample run #2 The two possible solutions for 7 44 11 are -0.26 and -6.02

//Sample run #3 The two possible solutions for 48 7 10 are NaN and NaN Note that you will get NaN as a result when the result is an imaginary number, which occurs when the radical portion of the answer (the part in the square root) is negative. Here is the actual result of the above numbers: = -0.072916666666667 0.45057351570588i The i shown at the end of the solution indicates imaginary. Your program will generate the NaN result when this is the case. To test your answer, go https://www.calculator.net/quadratic-formula-calculator.html?av=48&bv=7&cv=10&x=62&y=9 , enter the three random numbers generated and calculate the result.

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!