Skip to content

Instantly share code, notes, and snippets.

@kennedysean
Created May 12, 2020 00:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
struct StockPosition
{
std::string stockSymbol;
double stockValue;
double stockAverageCost;
unsigned int numShares;
};
class OopStockPortfolio
{
private:
std::vector<StockPosition> stockPortfolio;
unsigned int size;
public:
bool constructPortfolioFromFile(const std::string &fileName);
double getPortfolioValue();
double getPortfolioCost();
double getTotalReturn();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment