2042groupproject's Issues
Input correct data when leap year
Remember add #include<sstream>
bug find on 4.25
extra money neeeded(?)
Overflow error
Extreme example of R4
Changes for case 2 in main page (function R2)
In the class customerlist, void tostring() would be like:
void toString() {
printf("%-15s %-s %10d\n",CustomerID.c_str(), RanktoString[Ranking].c_str() , PointBalance);
}
In the struct giftrecord, void tostring would be like:
void toString(){
printf("%-6s %-10d %-6d %s\n",GiftID , price , PointRequired , GiftDiscription);
}
Besides, in the main(), it would be changed as:
case 2: {
sort(giftRecordList.begin() , giftRecordList.end() , []( GiftRecord a , GiftRecord b){
if (tolower(*a.GiftID) > tolower(*b.GiftID)) {
return false;
}
return true;
});
sort(customerList.begin() , customerList.end() , [](Customer a , Customer b){
if (tolower(*a.getCustomerID().c_str()) > tolower(*b.getCustomerID().c_str())) {
return false;
}
return true;
});
printf("%-15s %-6s %-s\n", "Customer ID", "Rank", "Point Balance");
for (auto customer_list : customerList) {
customer_list.toString();
}
printf("%-5s %-7s %-9s %s\n", "GiftID", "Price(HKD)", "Points Required", "Gift Description");
for (auto giftRecord : giftRecordList) {
giftRecord.toString();
}
break;
}
bug
Input date error and suggestion
No meaningful message shown if there does not include any output in the function 5
Suggestion for redeem gift in customer view
class of R5
here is the class of R5:
class CC_changehistory { //create class F5
public:
void createaddCC(string a, float b, int c, int d) {
user = a;
spent_money = b;
CC_point_ori = c;
CC_point_new = d;
}//constructor of F4.1
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
private:
string user; //dumb guy of F4
string description; //chosen gift descri of F4.2
char* giftrecording5 = new char[3]; //chosen gift of F4.2
int CC_point_ori; //point balance before running the F4(1/2/3)
int CC_point_new; //point balance after running the F4(1/2/3)
float spent_money; //spent input in F4.1
float extra_spent; //spent input in F4.2
};
vector<CC_changehistory> Fun5; //build up vector of class CC_changehistory
CC_changehistory F5; //name an object of CC_changehistory
Customer view: redeem gift input category error
Inconsistent after running R4
Version: bb5de9f
After changing CC point of customer, seems that the data did not save into the vector.
alphabetical order
debug
- show record --->table output sort -->t and m not sort correc5
- edit customer --->input id -->range (input 61 char)--> error .
- . edit customer --->input id -->is on list -----> add customer------>yes----->day input---->correct day -----(today, year(2024 eg 29042004 , 31012024))
- edit customer --->input id -->is on list -----> add customer------>yes----->day input---->wrong day
- edit customer --->input id -->is on list -----> add customer------>yes----->day input---->correct day ---->point --->no return menu's error , input type error (no return menu eg. we input 'a' )
Could add a list title of the function 2?
Suggestion for output information
Suggestion: Delete some unnecessary functions
Customer View output lost
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.