-
Notifications
You must be signed in to change notification settings - Fork 2
/
Stock.cpp
49 lines (46 loc) · 1.29 KB
/
Stock.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "stdafx.h"
#include "Stock.h"
using namespace std;
stock::stock(const string& tick, const string& zero, const double& act, const double& est, const double& perf, const string& start, const string& end)
: ticker(tick), dateZero(zero), dateStart(start), dateEnd(end), actual(act), estimate(est), performance(perf) {}
string stock::getTicker() const {
return ticker;
}
string stock::getStartDate() const {
return dateStart;
}
string stock::getEndDate() const {
return dateEnd;
}
double stock::getPerformance() const {
return performance;
}
void stock::pushBack(double num) {
Price_Series.push_back(num);
}
void stock::Info_Look()
{
for (int i = 0; i <= Price_Series.size() - 1; i++)
{
//cout << Price_Series[i] << endl;
}
}
const vector<double> stock::GetPrice()
{
return Price_Series;
}
int stock::getSeriesSize() const {
return Price_Series.size();
}
void stock::printStock() const {
cout << "Ticker: " << ticker << endl;
cout << "Start Date: " << dateStart << endl;
cout << "End Date: " << dateEnd << endl;
cout << "Actual ESP: " << actual << endl;
cout << "Estimate ESP: " << estimate << endl;
cout << "Performance: " << performance << endl;
for (int i = 0; i <= Price_Series.size() - 1; i++)
{
cout << Price_Series[i] << endl;
}
}