Hello everybody. I have a program to write, and I am having trouble with it. Can someone take a look at it and write out a possible code for it? i would really appreciate it. Thanks, here it is:
The program will develop a polynomial class. how do you represent a polynomial using an array and with its overloaded operators?
Develop class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent. The term 2x to the 4th power has a coefficient of 2 and an exponent of 4. Develop a full calss containing proper constructor and destructor functions as well as set and get functions. the class should also provide the following overloaded operator capabilities:
a) Overlaoad the addition operator (+) and add two Poly's
b) Overlaod the sub operator (-) adn sub two Poly's
c) Overload the assignment operator to assign one Poly to another
d) Overload the mult operator to mult two Poly's
e) Overload the add assignment operator (+=), the sub assignment operator (-=), and the mult assignment operator (*=).
If anyone can help, please give me some suggestions. Thanks again.
DonCL
The program will develop a polynomial class. how do you represent a polynomial using an array and with its overloaded operators?
Develop class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent. The term 2x to the 4th power has a coefficient of 2 and an exponent of 4. Develop a full calss containing proper constructor and destructor functions as well as set and get functions. the class should also provide the following overloaded operator capabilities:
a) Overlaoad the addition operator (+) and add two Poly's
b) Overlaod the sub operator (-) adn sub two Poly's
c) Overload the assignment operator to assign one Poly to another
d) Overload the mult operator to mult two Poly's
e) Overload the add assignment operator (+=), the sub assignment operator (-=), and the mult assignment operator (*=).
If anyone can help, please give me some suggestions. Thanks again.
DonCL