Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Progres.h
- #pragma once
- #ifndef PROGRES_H
- #define PROGRES_H
- #include <iostream>
- #include <cmath>
- #include <cassert>
- using namespace std;
- //оставляю первый член, остальное в наследники
- class Series {
- protected:
- double m_first;
- double m_second;
- public:
- virtual double Sum(int) = 0;
- virtual double SerJ(int ) = 0;
- };
- class Exponential : public Series {
- double m_coef;
- public:
- Exponential(double, double);
- Exponential();
- double Sum(int);
- double SerJ(int);
- friend std::ostream& operator<< (std::ostream& out, const Exponential& exponential);
- };
- class Linear : public Series {
- double m_coef;
- public:
- Linear(double, double);
- Linear();
- double Sum(int);
- double SerJ(int);
- friend std::ostream& operator<< (std::ostream& out, const Linear& linear);
- };
- #endif
Add Comment
Please, Sign In to add comment