Hello all,

I have an assignment that asks

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.

My question is, I see that I would need to use a class data structure.

But when it says write a short program, the book never went over anything that involves polynomials. I did some searching and it says something about vectors, is this the skill that i need to learn to solve this?

Can anyone steer me in the correct way to go about handling this question