Create a class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent, e.g., the term 2x4 has the coefficient 2 and the exponent 4.
Provide public member functions that perform each of the following tasks:
There are four lines.
The first two lines represent the greatest power and the corresponding coefficients of the first polynomial.
The last two lines represent the greatest power and the corresponding coefficients of the second polynomial.
The greatest power is in the range of 0-25.
Note that the coefficients are in descending order and each element is separated by a space.
Output the coefficients of the sum, difference and product of these two polynomials in descending order.
If the result of coefficient is 0, just print it.
Note that there is a new line character at the end of each answer.