``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148`` `````` #ifndef POLYNOMIAL_H #define POLYNOMIAL_H #include "linkedListType.h" class term { friend ostream& operator<<(ostream& osObject, term& t); private: double coef; int exp; public: term(){ coef = 0; exp =0;} term(double c, int e){ coef =c; exp =e;} ~term(){} void setCoef(double c){coef = c;} void setExp(int e){exp = e;} // double getCoef(){return coef;} // int getExp(){return exp;} term(const term& other){ coef =other.coef; exp = other.exp;} // precondition: exp == other.exp // the operation for *this + other term operator+ (const term& other){ term add; add.coef = coef + other.coef; add.exp = other.exp; return add; } // precondition: exp == other.exp // operation for *this - other term operator- (const term& other){ term sub; sub.coef = coef + other.coef; sub.exp = other.exp; return sub; } bool operator!= (const term& other){ if(exp != other.exp) return true; else return false; } bool operator== (const term& other){ if (exp = other.exp) return true; else return false; } //print a term void print(){ cout< *poly; public: polynomial(){ //default constructor poly = NULL; } ~polynomial(){} polynomial(const polynomial &other){ //copy constructor poly = other.poly; } const polynomial& operator= (const polynomial& other){ if(this != &other) polynomial(other); return *this; } //append a term to the polynomial void addTerm(term item){ } //print the polynomial void print(){ cout<< endl; cout<<" + "; } //return a new polynomial that is equal to *this + other //the contents of this and other should not be modified polynomial& add(polynomial& other){ return *this; } //return a new polynomial that is equal to *this - other //the contents of this and other should not be modified polynomial& sub(polynomial& other){ return *this; } }; #endif ``````

ANOTHER CODE

#include "polynomial.h"
using namespace std;

{}

int main()
{

string file1 = "poly1.txt";
string file2 = "poly2.txt";

polynomial p1;
cout << "P1 : ";
p1.print();
cout << endl;

polynomial p2;
cout << "P2 : ";
p2.print();
cout << endl;

cout << "P3 = P1 + P2 : ";
p3.print();
cout << endl;

cout << "P4 = P1 - P2 : ";
polynomial p4 = p1.sub(p2);
p4.print();
cout << endl;

cout << "P5 = P3 + P1 : ";
p5.print();
cout << endl;

system("pause");
exit(0);
}

You would need to post linkedListType.h to get an exact answer. I will just make some assumptions about what you have in that file.