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