This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DodStockPortfolio | |
{ | |
private: | |
std::vector<std::string> stockSymbols; | |
std::vector<double> stockValues; | |
std::vector<double> stockAverageCosts; | |
std::vector<unsigned int> numShares; | |
std::unordered_map<std::string, int> stockIndices; | |
unsigned int size; | |
unsigned int getStockIndex(const std::string &stockSymbol); | |
public: | |
bool constructPortfolioFromFile(const std::string &fileName); | |
double getPortfolioCost(); | |
double getPortfolioValue(); | |
double getTotalReturn(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment