void createGift(string a, string b, char& c, int d, int e, float f) {
user = a;
description = b;
giftrecording5 = &c;
CC_point_ori = d;
CC_point_new = e;
extra_spent = f;
}//constructor of F4.2
void createchangeCC(string a, int b, int c) {
user = a;
CC_point_ori = b;
CC_point_new = c;
}//constructor of F4.3
string getName() {
return user;
} //return customerID
int getOrg() {
return CC_point_ori;
}
int getLast() {
return CC_point_new;
}
float getSpent() {
return spent_money;
}
float getExtra() {
return extra_spent;
}
char getGift() {
return *giftrecording5;
}
void printF41() {
int w = 10;
cout << setw(w) << "Spent Money:" << setw(w) << spent_money << endl;
cout << setw(w) << "Value change:" << setw(w) << CC_point_ori - CC_point_new << endl;
}//Output of F4.1 in F5
void printF42() {
int w = 10;
cout << setw(w) << "Chosen gift:" << setw(w) << *giftrecording5 << endl;
cout << setw(w) << "Gift detail:" << setw(w) << description << endl;
cout << setw(w) << "CC point spent:" << setw(w) << CC_point_new - CC_point_ori << endl;
cout << setw(w) << "Extra spend:" << setw(w) << extra_spent << endl;
}//Output of F4.2 in F5
void printF43() {
int w = 10;
if (CC_point_new > CC_point_ori) {
cout << setw(w) << "Type of change:" << setw(w) << "incresaing.\n";
cout << setw(w) << "Increase value:" << setw(w) << CC_point_new - CC_point_ori << endl;
}
else if (CC_point_new < CC_point_ori) {
cout << setw(w) << "Type of change:" << setw(w) << "decresaing.\n";
cout << setw(w) << "Dncrease value:" << setw(w) << CC_point_ori - CC_point_new << endl;
}
} //Output of F4.3 in F5