-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVe.cpp
73 lines (65 loc) · 1.69 KB
/
Ve.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "Ve.h"
Ve::Ve(string MaVe, string MaPhim, string LoaiKhachHang, int GiaLoaiVe, int SoLuong, int SoVeDaBan){
this->MaVe = MaVe;
this->MaPhim = MaPhim;
this->LoaiKhachHang = LoaiKhachHang;
this->GiaLoaiVe = GiaLoaiVe;
this->SoLuong = SoLuong;
this->SoVeDaBan = SoVeDaBan;
}
Ve::~Ve(){}
string Ve::GetMaVe()
{
return this->MaVe;
}
void Ve::setMaVe(string MaVe){
this->MaVe = MaVe;
}
void Ve::setMaPhim(string MaPhim){
this->MaPhim = MaPhim;
}
void Ve::setLoaiKhachHang(string LoaiKhachHang){
this->LoaiKhachHang = LoaiKhachHang;
}
void Ve::setGiaLoaiVe(int GiaLoaiVe){
this->GiaLoaiVe = GiaLoaiVe;
}
void Ve::setSoLuong(int SoLuong){
this->SoLuong = SoLuong;
}
void Ve::setSoVeDaBan(int SoVeDaBan){
this->SoVeDaBan = SoVeDaBan;
}
void Ve::ThemSoVeDaBan(int x){
this->SoVeDaBan +=x;
}
string Ve::getMaVe(){
return this->MaVe;
}
string Ve::getMaPhim(){
return this->MaPhim;
}
string Ve::getLoaiKhachHang(){
return this->LoaiKhachHang;
}
int Ve::getGiaLoaiVe(){
return this->GiaLoaiVe;
}
int Ve::getSoLuong(){
return this->SoLuong;
}
int Ve::getSoVeDaBan(){
return this->SoVeDaBan;
}
int Ve::ThanhTien(){
return this->SoVeDaBan * this->GiaLoaiVe;
}
void Ve::Display(){
cout<<char(179)<< setw(15-1) << left << this->MaVe <<char(179);
cout << setw(15-1) << left << this->MaPhim << char(179);
cout << setw(20-1) << left << this->LoaiKhachHang << char(179);
cout << setw(15-1) << left << this->GiaLoaiVe <<char(179);
cout << setw(15-1) << left << this->SoLuong << char(179);
cout << setw(15-1) << left << this->SoVeDaBan << char(179);
cout << setw(15-1) << left << this->ThanhTien() << char(179)<< endl;
}