Lab 6 Lists
Due: Wednesday, March 8.
A univariate polynomial of degree d has the form:
cdxd + c d-1 x d-1 + c d-2 x d-2 + . . . + c0
where cd != 0. The cis are the coefficients, and d, d-1, . . . are the exponents. By definition d is a nonnegative integer. For this lab you may assume that the coefficients are also integers. Each cixi is a term of the polynomial. Your task is to develop a Java class to support arithmetic involving polynomials. For this exercise you will represent each polynomial as a list (c0, c1, c2, . . . cd) of coefficients.
Develop a Java class Polynomial that should have an instance data member degree, which is the degree of the polynomial. It may have other instance data members also. Your polynomial class should support the following operations:
Test your code! Hand in your code and output to convince me it works. Put your code in the dropbox with the usual naming conventions.