Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Polynomial.hpp
- Class declaration file for Polynomial
- Evan M. Purkhiser
- evanpurkhiser@gmail.com
- */
- #ifndef INCLUDED_POLYNOMIAL_HPP
- #define INCLUDED_POLYNOMIAL_HPP
- #include <iostream>
- #include <vector>
- /**
- * Class to handle mathmatical
- * polynomial oerations
- */
- class Polynomial {
- friend std::ostream& operator <<(std::ostream&, const Polynomial&);
- protected:
- std::vector<double> terms;
- public:
- Polynomial();
- Polynomial(const Polynomial&);
- Polynomial(const int);
- Polynomial(const int, const int);
- const double coefficient(const int);
- const Polynomial& operator +=(const Polynomial&);
- bool operator ==(const Polynomial&);
- bool operator ==(const int);
- bool operator !=(const Polynomial&);
- };
- std::ostream& operator <<(std::ostream&, const Polynomial&);
- #endif
Add Comment
Please, Sign In to add comment