-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStockAccount_zhou.h
65 lines (53 loc) · 1.26 KB
/
StockAccount_zhou.h
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef STOCKACCOUNT_ZHOU_H
#define STOCKACCOUNT_ZHOU_H
#include "Account_zhou.h"
#include "Node_zhou.h"
#include <iostream>
#include <fstream>
#include <string>
#include <time.h>
#include <stdlib.h>
#include <map>
#include <iomanip>
#include <new>
#pragma comment( lib, "libmx.lib" )
#pragma comment( lib, "libmex.lib" )
#pragma comment( lib, "libeng.lib" )
#include <yvals.h>
#if (_MSC_VER >= 1600)
#define __STDC_UTF_16__
#endif
#include "mex.h"
// end
#include<engine.h>
#include<cmath>
class StockAccount : public Account
{
public:
StockAccount();
~StockAccount();
double getBalance() const;
void setBalance(const double &);
void displayPrice( std::string );
bool checkSymbol( std::string );
double getPrice( std:: string );
bool isEmpty() const;
int getSize() const;
int getShare( string ) const;
void buyStock( Node *, double );
void sellStock( Node *, double );
void print();
void sortStockValue();
void swap ( Node *, Node * );
Node * partition( Node *, Node * );
void quickSort( Node *, Node * );
void displayPortfolio();
void viewHistory();
void viewGraph(string, string);
//friend int rGen();
private:
Node *myHead; // first pointer
Node *myTail; // last pointer
int mySize; // size of doubly linked list
};
#endif