#ifndef STOCK_H_ #define STOCK_H_ #include using namespace std; // A Stock object represents some number of owned shares class Stock { public: Stock(string symbol, double share_price = 0.0); // Stock's mutator/accessor methods. string get_symbol() const; int get_shares() const; double get_share_price() const; void set_share_price(double share_price); // Stock's "investment" interface. void Purchase(int shares, double share_price); double GetCost() const; double GetMarketValue() const; double GetProfit() const; // Print out the Stock information. void Print() const; private: string _symbol; int _shares; double _cost; double _share_price; }; #endif // STOCK_H_