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.
Default constructorPostcondition: myB == 0.0 && myA == 0.0.
Construct from doubleReceive: double aValue, double bValue.
Postcondition: myA == aValue && myB == bValue.
Construct from StringReceive: 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.
B-attribute accessorReturn: myB.
B-attribute mutatorReceive: double newB.
Postcondition: myB == newB.
String converter (output)Return: the String equivalent to myA.
Back to the package documentation index