A univariate polynomial is of the form
In this assignment you
are to provide an implementation (.cpp file) for the
Polynomial
class as declared in
assign2_polynomial.h (and documented
here). You are to implement the following
functions and operators:
Polynomial(int d, double *coefs)
-- constructordouble operator() (double x) const
-- evaluation
operatorint degree() const
-- return the degreePolynomial& operator += (const Polynomial& r)
--
addition with assignmentPolynomial& operator *= (const Polynomial& r)
--
multiplication with assignmentBe sure to include appropriate comments, including file and function header blocks (see Assignment Policies), and to use good style as outlined in Programming With Style. Submit your source code using Web Submit.
Last modified: Thu 2003.05.22 at 22:58 NDT by Dennis Peters