The goal of this program is to create a class (called Polynomial) to represent polynomials. Polynomials have the form
You should include methods for modifying coefficients, and adding, subtractying, and multiplying polynomials. Your class should include two constructors, one that specifies the degree of the polynomial, and one that simply supplies an array of doubles to use as coefficients. Your class should also include a method to evaluate the polynomial at a particular point, and a toString() method.
Your class should represent a polynomial as an array of coefficients. Recall that
and
Your program must be accompanied by a one page ASCII document (.txt format) that shows your design:
Your program must also contain clear and descriptive variable names and comments, and good formatting that enhances the clarity of the program.
REMEMBER: Do not submit object files, assembler files, or executables. Every file in the submit directory that could be generated automatically by the compiler or assembler will result in a 5 point deduction from your programming assignment grade.
sbrandt@cse.ucsc.edu |