PolynomialD2.java defines a degree 2 polynomial class. This class extends PolynomialD1
NOTE: Polynomial terms are white-space delimited.
Examples: 1 + 2x - 3xx, 1 +2x -3xx, 1 -2x + 3xx are all ok.
Default constructorPostcondition: myA == 0.0 && myB == 0.0 && myC == 0.0.
Construct from doubleReceive: double aValue, double bValue, double cValue.
Postcondition: myA == aValue && myB == bValue && myC == cValue.
Construct from StringReceive: String polyString.
Precondition: strPolyD1 is of the form "a + bx + cxx" or "a + bX + cXX", where a and b are numeric values.
Postcondition: myA == a && myB == b && myC == c.
C-attribute accessorReturn: myC.
C-attribute mutatorReceive: double newC.
Postcondition: myC == newC.
String converter (output)Return: the String equivalent to me.
Back to the package documentation index