Created
May 12, 2020 00:19
-
-
Save kennedysean/ec05ae8c364ca731be52cbb752e04441 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
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