#ifndef CASH_H_ #define CASH_H_ #include // The Cash class represents money owned by the investor. class Cash { public: // Construct a cash investment of a given amount. Cash(double amount) : amount_(amount) { } // Cash's accessor methods. void set_amount(double amount); double get_amount() const { return amount_; } // Cash's "investment" interface. double GetMarketValue() const; double GetProfit() const; double GetCost() const; // Overload (ostream& <<) so we can print Cash. friend std::ostream &operator<<(std::ostream &out, const Cash &rhs); private: double amount_; // amount of money owned }; #endif // CASH_H_