#pragma once #include #include #include #include #include #include class Imp { public: std::string Name; Imp(std::string c) { Name = c; } virtual void DisplayName(); }; const std::vector explode(const std::string& s, const char& c); class Asset:public Imp { private: double Value; double ProfitPercentPerYear; double FlatProfitPerYear; public: int ID;//1- Lokata 2- Konto Emerytalne 3- nieruchomosc double SimulateProfit(int Years); void DisplayName(); double GetValue(); std::string GetName(); double GetProfitPercent(); double GetFlatProfit(); void SetValue(double v); void SetName(std::string N); void SetProfitPercent(double PerCent); void SetFlatProfit(double Flat); void SaveState(std::fstream& File); Asset& operator +=(const Asset& Modified); Asset& operator -=(const Asset& Modified); Asset(double PerCent, double Flat, double value,std::string c,int id):Imp(c) { this->Value = value; this->ProfitPercentPerYear = PerCent; this->FlatProfitPerYear = Flat; this->ID = id; } Asset():Imp("") { this->Value = 0; this->ProfitPercentPerYear = 0; this->FlatProfitPerYear = 0; this->ID = 0; } };