Don’t know if this is ever been done before, or even if it is a good way to do it.
I’ll just await your comments if any.
What I mostly found on the web is that if you want to define a polynomial you need to have an array containing the coefficients. The place of the coefficient in the array determines the power of the unknown, you have to include a 0(zero) in the array for the powers that are not in your polynomial.
So I tried to do it using a list of tuples, with one element containing the coefficient and the other the power or exponent. That way I did not have to include zero coefficients in my list. Even the order of the Tuples in the list would not matter. Further, I wrapped the rather generic Tuple class in a TMonomial class. Polynomials are in fact just a bunch of monomials. It was also an excellent opportunity to use the operator overload feature. If I did too many of them or if I missed a few, please let me know.
As code examples: my console test program and the code of my polynomial division, which implements the division algorithm quite readable I think.
Also included a zip file with the whole project.