| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface PolynomialI
The PolynomialI interface manages a polynomial.
Example: 4.3x^2 is a polynomial where 4.3 is the coefficient constant and the degree is 2.
| Method Summary | |
|---|---|
|  double | eval(double x)Returns the result of the polynomial calculated with the given x. | 
|  double | getCoefficient(int degree)Return the coefficient constant used in the polynomial for the degree specified. | 
| Method Detail | 
|---|
double getCoefficient(int degree)
The valid request values are 0 <= degree <= 3.
degree - Coefficient constant degree to return
java.lang.IllegalArgumentException - if the degree greater than 3 
 or degree less than 0.double eval(double x)
x - The x to plug into the equation.
| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||