mramine364

monomial.h

Jul 9th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. class monomial
  5. {
  6.     double coef;
  7.     int deg;
  8. public:
  9.     monomial(double, int);
  10.     monomial(const monomial& m) : monomial(m.coef, m.deg){}
  11.     monomial(double x) :monomial(x, 0){}
  12.     monomial() :monomial(0, 0){}
  13.     ~monomial();
  14.  
  15.     void setCoef(double);
  16.     double getCoef() const;
  17.     void setDeg(int);
  18.     int getDeg() const;
  19.  
  20.     friend ostream& operator<<(ostream&, const monomial&);
  21. };
Advertisement
Add Comment
Please, Sign In to add comment