Package math.quadratic
Class QuadraticSolver
java.lang.Object
math.quadratic.QuadraticSolver
public class QuadraticSolver
extends java.lang.Object
- Author:
- GBEMIRO
-
Constructor Summary
Constructors Constructor Description QuadraticSolver(double a, double b, double c) -
Method Summary
-
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
public java.lang.String solve()- Returns:
- the solutions as a string of values.
-
soln
public java.lang.String[] soln()- Returns:
- the solutions as an array of values
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-