00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef STOCK_H
00019 #define STOCK_H
00020
00021 #include <iostream>
00022 #include <string>
00023 #include <vector>
00024 #include "Subject.h"
00025
00026 using namespace std;
00027
00032 class Stock : public Subject {
00033
00034 private:
00035 string name;
00036 string wkn;
00037 string buyingDate;
00038 int amount;
00039 float buyingRate, purchaseCost, currentMarketPrice, currentMarketPriceDayBefore;
00040
00041 vector <float> values;
00042
00043 public:
00044 Stock();
00045 Stock(const string & name, const string & wkn, const string & buyingDate, const int & Amount,
00046 const float & buyRate, const float & purchaseCost, const float & currentMarketPrice);
00047 Stock(const string & name, const string & wkn, const string & buyingDate, const int & Amount,
00048 const float & buyRate, const float & purchaseCost, const float & currentMarketPrice,
00049 const vector <float> & values);
00050 Stock(const Stock &stock);
00051 ~Stock();
00052
00053 string getName() const;
00054 string getWkn() const;
00055 string getBuyingDate() const;
00056 int getAmount() const;
00057 float getBuyingRate() const;
00058 float getPurchaseCost() const;
00059 float getCurrentMarketPrice() const;
00060 float getCurrentMarketPriceDayBefore() const;
00061 vector <float> getValuesVector() const;
00062
00063 void setName(const string & name);
00064 void setWkn(const string & wkn);
00065 void setBuyingDate(const string & buyingDate);
00066 void setAmount(const int & Amount);
00067 void setBuyingRate(const float & buyingRate);
00068 void setPurchaseCost(const float & purchaseCost);
00069 void setCurrentMarketPrice(const float & CurrentMarketPrice);
00070 void setCurrentMarketPriceDayBefore(const float & CurrentMarketPriceDayBefore);
00071
00072 friend int operator!=(const Stock &x, const Stock &y);
00073 friend int operator==(const Stock &x, const Stock &y);
00074 friend bool operator<(const Stock &x, const Stock &y);
00075 };
00076
00077
00078 #endif