PolynomialD1.java - defines a degree 1 polynomial class. This class extend PolynomialD0.
NOTE: Polynomial terms are white-space delimited.
Examples: 1 + 2x, 1 +2x, 1 -2x are all ok.
Postcondition: myB == 0.0 && myA == 0.0.
Construct from double
Receive: double aValue, double bValue.
Postcondition: myA == aValue && myB == bValue.
Construct from String
Receive: String polyString.
Precondition: strPolyD1 is of the form "a + bx" or "a + bX", where a and b are numeric values.
Postcondition: myA == a && myB == b.
Receive: double newB.
Postcondition: myB == newB.
String converter (output)
Return: the String equivalent to myA.
Back to the package documentation index
Back to the Introduction