1. Engineering
2. Computer Science
3. intro to java problem 910 the quadratic equation the bold...

# Question: intro to java problem 910 the quadratic equation the bold...

###### Question details

Intro to java problem 9.10 the Quadratic Equation, the bold is where i am getting errors and dont know how to fix them

import java.util.Scanner;

/**
*

*/

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here

/** Data fields */
// represent three coeficients
private double a;
private double b;
private double c;

/** Constructor for the arguments for a, b, and c */
QuadraticEquation(double a, double b, double c) {
this.a = a;
this.b = b;
this.c = c;
}

public double getA() {
return a;
}

/** Returns b */
public double getB() {
return b;
}

/** Returns c */
public double getC() {
return c;
}

/** Returns the discriminant */
public double getDiscriminant() {
return Math.pow(b, 2) - 4 * a * c;
}

/** Returns root1 */
public double getRoot1() {
return getDiscriminant() < 0 ? 0 :
((-b) + Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a);
}

/** Returns root2 */
public double getRoot2() {
return getDiscriminant() < 0 ? 0 :
((-b) - Math.sqrt(Math.pow(b, 2) - 4 * a * c)) / (2 * a);

/** Main method */

// Create a Scanner object
Scanner input = new Scanner(System.in);

// Prompt the user to enter values for a, b, and c
System.out.print("Enter a, b, c: ");
double a = input.nextDouble();
double b = input.nextDouble();
double c = input.nextDouble();

// Compute the real roots of the quadriatic equation if any.
System.out.print("The equation has ");
System.out.println("no real roots");
else if (quadraticEquation.getDiscriminant() > 0) {
System.out.println("two roots " + quadraticEquation.getRoot1() +