-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccount.cpp
More file actions
66 lines (51 loc) · 1.15 KB
/
account.cpp
File metadata and controls
66 lines (51 loc) · 1.15 KB
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
66
// Account.cpp
#include "account.h"
wlt::Account::Account(const std::string& Name, std::string CurrencyType, double Count)
{
this->Name = Name;
this->CurrencyType = CurrencyType;
this->Count = Count;
}
wlt::Account::Account(const char* Name, std::string CurrencyType, double Count)
{
std::string s(Name);
this->Name = s;
this->CurrencyType = CurrencyType;
this->Count = Count;
}
wlt::Account::~Account()
{
}
void wlt::Account::setName(const std::string &str)
{
this->Name = str;
}
std::string wlt::Account::getName()
{
return this->Name;
}
void wlt::Account::setCurrencyType(const std::string& str)
{
this->CurrencyType = str;
}
std::string wlt::Account::getCurrencyType()
{
return this->CurrencyType;
}
void wlt::Account::setCount(double c)
{
this->Count = c;
}
double wlt::Account::getCount()
{
return this->Count;
}
std::string wlt::Account::debugInfo()
{
std::string str = "Name: \'" + this->Name + "\'\tValue: " + std::to_string( this->Count ) + " " + this->CurrencyType;
return str;
}
void wlt::Account::changeCount(double val)
{
this->Count = this->Count + val;
}