Guest User

Untitled

a guest
Dec 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. /*
  2. Polynomial.hpp
  3.  
  4. Class declaration file for Polynomial
  5.  
  6. Evan M. Purkhiser
  7. evanpurkhiser@gmail.com
  8. */
  9.  
  10. #ifndef INCLUDED_POLYNOMIAL_HPP
  11. #define INCLUDED_POLYNOMIAL_HPP
  12.  
  13. #include <iostream>
  14. #include <vector>
  15.  
  16. /**
  17. * Class to handle mathmatical
  18. * polynomial oerations
  19. */
  20. class Polynomial {
  21.  
  22. friend std::ostream& operator <<(std::ostream&, const Polynomial&);
  23.  
  24. protected:
  25.  
  26. std::vector<double> terms;
  27.  
  28. public:
  29.  
  30. Polynomial();
  31.  
  32. Polynomial(const Polynomial&);
  33.  
  34. Polynomial(const int);
  35.  
  36. Polynomial(const int, const int);
  37.  
  38. const double coefficient(const int);
  39.  
  40. const Polynomial& operator +=(const Polynomial&);
  41.  
  42. bool operator ==(const Polynomial&);
  43.  
  44. bool operator ==(const int);
  45.  
  46. bool operator !=(const Polynomial&);
  47.  
  48. };
  49.  
  50. std::ostream& operator <<(std::ostream&, const Polynomial&);
  51.  
  52. #endif
Add Comment
Please, Sign In to add comment