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