I know the rules about the homework and me posting code or an attempt to make it.

I have no clue at the moment on how to approach this. I understand what

Degree() will do.

But with coefficient(power) i just see a function that uses something like a switch command .like if 3 is put in, it will return a number that u already put into the switch command.

is it possible to do these without prepluggin in these numbers?

3.7 Recall that a polynomial in a single variable has the form a0xm + a1xm- 1 + a2xm-2 + … + an-2x2 + an-1x + an. An example of a polynomial is 4x12 - 3x10 + 5x8 + x4 -12x2 + x - 6. Notice that not all exponents may be included in a polynomial. Implement an ADT to represent a polynomial in a single variable x whose operations include the following:

degree()

// Returns the degree of the polynomial.

Coefficient(power)

// Returns the coefficient of the xpower term.

changeCoefficient(newCoefficient, power)

// Replaces the coefficient of the xpower term with

// newCoefficient.

For this problem consider only polynomials whose exponents are nonnegative integers. As the programmer, you will decide what data is to be stored and how that data is to be stored. What data type will you use to represent information for each node in this polynomial? What data structure will best represent any polynomial you wish to create?

Write a short program to test your ADT. Remember to separate your definition and implementation of this ADT into two files. Create a third file for your test program.