Class QuadraticSolver


  • public class QuadraticSolver
    extends java.lang.Object
    Author:
    GBEMIRO
    • Constructor Summary

      Constructors 
      Constructor Description
      QuadraticSolver​(double a, double b, double c)  
    • Method Summary

      Modifier and Type Method Description
      double getA()  
      double getB()  
      double getC()  
      static void main​(java.lang.String[] args)  
      void setA​(double a)  
      void setB​(double b)  
      void setC​(double c)  
      java.lang.String[] soln()  
      java.lang.String solve()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QuadraticSolver

        public QuadraticSolver​(double a,
                               double b,
                               double c)
        Parameters:
        a - the co-efficient of the squared variable
        b - the co-efficient of the variable
        c - the constant term
    • Method Detail

      • 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:
        toString in class java.lang.Object
      • main

        public static void main​(java.lang.String[] args)