Package math.quadratic
Class QuadraticSolver
java.lang.Object
math.quadratic.QuadraticSolver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
a
private double a -
b
private double b -
c
private double c
-
-
Constructor Details
-
QuadraticSolver
public QuadraticSolver(double a, double b, double c) - Parameters:
a
- the co-efficient of the squared variableb
- the co-efficient of the variablec
- the constant term
-
-
Method Details
-
setA
public void setA(double a) - Parameters:
a
- the co-efficient of the squared variable
-
getA
public double getA()- Returns:
- the co-efficient of the squared variable
-
setB
public void setB(double b) - Parameters:
b
- the co-efficient of the variable
-
getB
public double getB()- Returns:
- the co-efficient of the squared variable
-
setC
public void setC(double c) - Parameters:
c
- the constant term
-
getC
public double getC()- Returns:
- the constant term
-
solve
- Returns:
- the solutions as a string of values.
-
soln
- Returns:
- the solutions as an array of values
-
toString
-
main
-