Last active
May 12, 2020 00:21
-
-
Save kennedysean/2b84ea6fb4ca455a64fdd97d5ab67b60 to your computer and use it in GitHub Desktop.
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