/* CSE 333 Su12 lecture 14 demo: stocks_virtual/DividendStock.h */ /* Gribble/Perkins */ // Specification of class DividendStock #ifndef _DIVIDENDSTOCK_H_ #define _DIVIDENDSTOCK_H_ #include #include "./Stock.h" using namespace std; // A DividendStock object represents holdings of a single // stock that also pays dividends. class DividendStock : public Stock { public: DividendStock(string symbol, double share_price = 0.0); // DividendStock's mutator and accessor methods. virtual void PayDividend(double amount_per_share); // DividentStock's "investment" interface. virtual double GetProfit() const; virtual double GetDividends() const; // Print out the DividendStock information. virtual void Print() const; private: double dividends_; // total dividends paid on holdings of this stock }; #endif // _DIVIDENDSTOCK_H_