my project is
Develop class Polynomial.This internal representation of a polynomial is an array of terms.Each term contains a coefficient and an exponent, hence you can have an array for coefficients and exponents as a member of your class(maximum number of terms will 100 however your class should also contain a member variable that indicates how many terms are there in a given instance of the polynomial class).
the term 2x^4 has a coefficient of 2 and exponent of 4. Develop a full class containing proper constructor and destructor functions as well as set and get functions. The class should also provide the following overloaded operator capabilities:
 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465`` `````` #include using namespace std; class Polynomial { private: int *Coefficient; int *Exponents; int Nterms;//number of terms public: Polynomial(); int getC(){return Coefficient}; int getE(){return Exponents}; void getUserInput(); friend Polynomial operator+(const Polynomial&); }; Polynomial operator+(Polynomial&A,Polynomial&B){ //Adds two polynomial objects when exponents become equal in the loop Polynomial C; for(int i=0;i<100;i++){ if(A.getE()[i]==B.getE()[i]){ C.getE()[i]=A.getE()[i]; C.getC()[i]=B.getE()[i]+A.getE()[i]; } } return C; }; Polynomial operator-(Polynomial&A,Polynomial&B){//Sub two polynomial objects when exponents become equal in the loop Polynomial C; for(int i=0;i<100;i++){ if(A.getE()[i]==B.getE()[i]){ C.getE()[i]=A.getE()[i]; C.getC()[i]=B.getE()[i]-A.getE()[i]; } } return C; }; //constructors Polynomial::Polynomial() { Nterms=0; Coefficient = new int[100]; Exponents = new int[100]; for (int i = 0; i < 100; i++) { Coefficient[i] = 0; Exponents[i] = 0; } } void Polynomial::getUserInput(){//Allows user to enter coef and expo cout<<"Enter the Exponent of Polynomial: "; cin>>Exponents[Nterms]; cout<>Coefficient[Nterms]; Nterms++; }``````