You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write Java program called QuadraticEquation which computes two x values of a quadratic equation expressed as ax?+bx+c=0, using general formula method, assuming that b2 ≥ 4ac. The program should contain three instance variables a, b, and C, all of type double, for coefficients a, b and c, respectively. These coefficients must be supplied to the program by the user via the keyboard, and get initialized by an appropriate user-defined constructor at the time of creating an object. The program should also contain two instance methods, both returning double values, called computeFirstX and computeSecondX for computing the two x values.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Write Java program called QuadraticEquation which computes two x values of a quadratic equation expressed as ax?+bx+c=0, using general formula method, assuming that b2 ≥ 4ac. The program should contain three instance variables a, b, and C, all of type double, for coefficients a, b and c, respectively. These coefficients must be supplied to the program by the user via the keyboard, and get initialized by an appropriate user-defined constructor at the time of creating an object. The program should also contain two instance methods, both returning double values, called computeFirstX and computeSecondX for computing the two x values.
Beta Was this translation helpful? Give feedback.
All reactions