Consider a class Polynomial, which represents polynomials of a single variable up to the fourth power (x4). The sole instance variable of a Polynomial is an array of size 5, that stores doubles. Each element of the array represents the coefficients of the Polynomial at the corresponding power. For example:
Element 0 is the coefficient of the x0 term Element 1 is the coefficient of the x1 term Element 2 is the coefficient of the x2 term Element 3 is the coefficient of the x3 term Element 4 is the coefficient of the x4 term
Thus the polynomial 3.0 – 1.0x +2.0x2 would be represented by the array:
Write the class Polynomial that includes the following methods:
included in the attached file