-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Bill.h
90 lines (69 loc) · 1.25 KB
/
Bill.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef BILL_H_
#define BILL_H_
#include <string>
#include <sstream>
using namespace std;
namespace MPOST
{
class CBill
{
friend class CAcceptor;
public:
CBill()
{
_country = "***";
_value = 0.0;
_type = '*';
_series = '*';
_compatibility = '*';
_version = '*';
}
CBill(string country, double value, char type, char series, char compatibility, char version)
{
_country = country;
_value = value;
_type = type;
_series = series;
_compatibility = compatibility;
_version = version;
}
string ToString()
{
stringstream ss;
ss << _country << " " << _value << " " << _series << " " << _type << " " << _compatibility << " " << _version;
return ss.str();
}
string GetCountry()
{
return _country;
}
double GetValue()
{
return _value;
}
char GetSeries()
{
return _series;
}
char GetType()
{
return _type;
}
char GetCompatibility()
{
return _compatibility;
}
char GetVersion()
{
return _version;
}
private:
string _country;
double _value;
char _series;
char _type;
char _compatibility;
char _version;
};
}
#endif /*BILL_H_*/