Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <fstream>
- #include <string>
- class MessageOperation
- {
- private:
- std::string message;
- public:
- MessageOperation(std::string message):message{message}{std::cout<<message;}
- };
- class FinanceSystemZozInc
- {
- private:
- static int idsWallets;
- static int idsDebitCards;
- static int idsCreditCards;
- protected:
- //Clases
- class WalletZozInc
- {
- private:
- int id{idsWallets++};
- std::string _nameOfOwnerOfWallet;
- std::string _nameOfWallet;
- long double _money;
- public:
- //Constructs
- WalletZozInc(std::string nameOfOwnerOfWallet):_nameOfOwnerOfWallet{nameOfOwnerOfWallet},_nameOfWallet{"WalletZozInc"},_money{0}
- {MessageOperation("\tHello,you make wallet in ZozInc\n");}
- WalletZozInc(char* nameOfOwnerOfWallet):_nameOfOwnerOfWallet{nameOfOwnerOfWallet},_nameOfWallet{"WalletZozInc"},_money{0}
- {MessageOperation("\tHello,you make wallet in ZozInc\n");}
- WalletZozInc():_nameOfOwnerOfWallet{"ZozInc"},_nameOfWallet{"WalletZozInc"},_money{0}{};
- //Methods_Sets
- void changeNameOfWallet(std::string nameOfWallet){_nameOfWallet=nameOfWallet;MessageOperation("Name of wallet was changed!\n");}
- void changeNameOfWallet(char* nameOfWallet){_nameOfWallet=nameOfWallet;MessageOperation("Name of wallet was changed!\n");}
- void addMoney(long double money,std::string aboutOperation="No add. information")
- {_money+=money;MessageOperation((std::string)aboutOperation);std::cout<<"\n";}//Проверить на вывод
- void minucMoney(long double money,std::string aboutOperation="No add. information"){
- if(money>_money){MessageOperation("Error...low balance\n");}
- else{_money-=money;MessageOperation((std::string)aboutOperation);std::cout<<"\n";}
- }
- //Methods_Gets(Stats)
- void showMyWallet(){std::cout<<"\t\t"<<_nameOfWallet<<"\n"<<"Owner = "<<_nameOfOwnerOfWallet<<"\n"<<"Money = "<<_money<<"\nGood luck, your ZozInc\n";}
- int getId(){return id;}
- std::string getNameOfOwnerOfWallet(){return _nameOfOwnerOfWallet;}
- std::string getNameOfWallet(){return _nameOfWallet;}
- long double getMoney(){return _money;}
- //Operators
- void operator=(WalletZozInc& object)
- {
- id=object.getId();
- _nameOfOwnerOfWallet=object.getNameOfOwnerOfWallet();
- _nameOfWallet=object.getNameOfWallet();
- _money=object.getMoney();
- }
- //Admin methods
- void changeNameOfOwnerOfWallet(std::string nameOfOwnerOfWallet,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfWallet=nameOfOwnerOfWallet;} }
- void changeNameOfOwnerOfWallet(char* nameOfOwnerOfWallet,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfWallet=nameOfOwnerOfWallet;} }
- void changeMoney(long double countMoney,std::string pass){if(pass=="AdminKey"){_money=countMoney;} }
- void changeId(int id,std::string pass){if(pass=="AdminKey"){this->id=id;}}
- };
- class DebitCardZozInc
- {
- private:
- int id{idsDebitCards++};
- std::string _nameOfOwnerOfDebitCard;
- std::string _nameOfDebitCard;
- long double _money;
- public:
- //Constructs
- DebitCardZozInc(std::string nameOfOwnerOfDebitCard):_nameOfOwnerOfDebitCard{nameOfOwnerOfDebitCard},_nameOfDebitCard{"DebitCardZozInc"},_money{0}{MessageOperation("\tHello, you make debit card in ZozInc\n");}
- DebitCardZozInc(char* nameOfOwnerOfDebitCard):_nameOfOwnerOfDebitCard{nameOfOwnerOfDebitCard},_nameOfDebitCard{"DebitCardZozInc"},_money{0}{MessageOperation("\tHello, you make debit card in ZozInc\n");}
- DebitCardZozInc():_nameOfOwnerOfDebitCard{"ZozInc"},_nameOfDebitCard{"DebitCardZozInc"},_money{0}{};
- //Methods_Sets
- void changeNameOfDebitCard(std::string nameOfDebitCard) {_nameOfDebitCard=nameOfDebitCard;MessageOperation("Name of debit card was changed!");}
- void changeNameOfDebitCard(char* nameOfDebitCard) {_nameOfDebitCard=nameOfDebitCard;MessageOperation("Name of debit card was changed!");}
- void addMoney(long double money,std::string aboutOperation="No add. information")
- {
- int number;
- std::cout<<"Сommission = "<<_money*0.005<<".For complete operation enter 1, for stop operation enter antoher number.\nNumber = ";
- std::cin>>number;
- if(number==1) {_money+=money-_money*0.005;MessageOperation((std::string)aboutOperation);std::cout<<"\n";}
- else{MessageOperation("Operation not completed\n");}
- }//Проверить на вывод
- void minucMoney(long double money,std::string aboutOperation="No add. information")
- {
- int number;
- std::cout<<"Сommission = "<<_money*0.010<<".For complete operation enter 1, for stop operation enter antoher number.\nNumber = ";
- std::cin>>number;
- if(number==1){ if(money>_money){MessageOperation("Error...low balance\n");} else{_money-=money;MessageOperation((std::string)aboutOperation);std::cout<<"\n";}}
- else{MessageOperation("Operation not completed\n");}
- }
- //Methods_Gets
- void showMyDebitCard() {std::cout<<"\t\t"<<_nameOfDebitCard<<"\n"<<"Owner = "<<_nameOfOwnerOfDebitCard<<"\n"<<"Money = "<<_money<<"\nGood luck, your ZozInc\n";}
- int getId(){return id;}
- std::string getNameOfOwnerOfDebitCard(){return _nameOfOwnerOfDebitCard;}
- std::string getNameOfDebitCard(){return _nameOfDebitCard;}
- long double getMoney(){return _money;}
- //Operators
- void operator=(DebitCardZozInc& object)
- {
- id=object.getId();
- _nameOfOwnerOfDebitCard=object.getNameOfOwnerOfDebitCard();
- _nameOfDebitCard=object.getNameOfDebitCard();
- _money=object.getMoney();
- }
- //Admin methods
- void changeNameOfOwnerOfDebitCard(std::string nameOfOwnerOfDebitCard,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfDebitCard=nameOfOwnerOfDebitCard;} }
- void changeNameOfOwnerOfDebitCard(char* nameOfOwnerOfDebitCard,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfDebitCard=nameOfOwnerOfDebitCard;} }
- void changeMoney(long double countMoney,std::string pass){if(pass=="AdminKey"){_money=countMoney;} }
- void changeId(int id,std::string pass){if(pass=="AdminKey"){this->id=id;}}
- };
- class CreditCardZozInc
- {
- private:
- int id{idsCreditCards++};
- std::string _nameOfOwnerOfCreditCard;
- std::string _nameOfCreditCard;
- long double _money;
- long double _creditLimit;
- public:
- //Constructs
- CreditCardZozInc(std::string nameOfOwnerOfCreditCard):_nameOfOwnerOfCreditCard{nameOfOwnerOfCreditCard},_nameOfCreditCard{"CreditCardZozInc"},_money{0},_creditLimit{0}{MessageOperation("\tHello,you make credit card in ZozInc\n");}
- CreditCardZozInc(char* nameOfOwnerOfCreditCard):_nameOfOwnerOfCreditCard{nameOfOwnerOfCreditCard},_nameOfCreditCard{"CreditCardZozInc"},_money{0},_creditLimit{0}{MessageOperation("\tHello,you make credit card in ZozInc\n");}
- CreditCardZozInc():_nameOfOwnerOfCreditCard{"ZozInc"},_nameOfCreditCard{"CreditCardZozInc"},_money{0},_creditLimit{0}{}
- //Methods_Sets
- void changeNameOfCreditCard(std::string nameOfCreditCard){_nameOfCreditCard=nameOfCreditCard;MessageOperation("Name of credit card was changed!");}
- void changeNameOfCreditCard(char* nameOfCreditCard){_nameOfCreditCard=nameOfCreditCard;MessageOperation("Name of credit card was changed!");}
- void addMoney(long double money,std::string aboutOperation="No add. information"){if(_creditLimit>0){if(money>_creditLimit){money-=_creditLimit;_creditLimit=0;}else{_creditLimit-=money;money=0;}}_money+=money;MessageOperation((std::string)aboutOperation);}
- void minucMoney(long double money,std::string aboutOperation="No add. information"){
- int number;
- std::cout<<"Сommission = "<<_money*0.15<<".For complete operation enter 1, for stop operation enter antoher number.\nNumber = ";
- std::cin>>number;
- if(number==1){ if(money>_money){MessageOperation("Error...low balance\n");} else{_money-=money;MessageOperation((std::string)aboutOperation);std::cout<<"\n";}}
- else{MessageOperation("Operation not completed\n");} }
- //Methods_Gets
- void showMyCreditCard(){std::cout<<"\t\t"<<_nameOfCreditCard<<"\n"<<"Owner = "<<_nameOfOwnerOfCreditCard<<"\n"<<"Money = "<<_money<<"\nCredit limit = "<<_creditLimit<<"\nGood luck, your ZozInc\n";}
- int getId(){return id;}
- std::string getNameOfOwnerOfCreditCard(){return _nameOfOwnerOfCreditCard;}
- std::string getNameOfCreditCard(){return _nameOfCreditCard;}
- long double getMoney(){return _money;}
- long double getCreditLimit(){return _creditLimit;}
- //Operators
- void operator=(CreditCardZozInc& object)
- {
- id=object.getId();
- _nameOfOwnerOfCreditCard=object.getNameOfOwnerOfCreditCard();
- _nameOfCreditCard=object.getNameOfCreditCard();
- _money=object.getMoney();
- }
- //Admin methods
- void changeNameOfOwnerOfCreditCard(std::string nameOfOwnerOfCreditCard,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfCreditCard=nameOfOwnerOfCreditCard;} }
- void changeNameOfOwnerOfCardCard(char* nameOfOwnerOfCreditCard,std::string pass) { if(pass=="AdminKey"){_nameOfOwnerOfCreditCard=nameOfOwnerOfCreditCard;} }
- //zzzjhjggjjhnhmmbmmbmbmfdfgkjsdfh
- void changeMoney(long double countMoney,std::string pass){if(pass=="AdminKey"){_money=countMoney;} }
- void changeCreditLimit(long double countCreditMoney,std::string pass){if(pass=="AdminKey"){_creditLimit=countCreditMoney;}}
- void changeId(int id, std::string pass){if(pass=="AdminKey"){this->id=id;}}
- //Credit Limit
- void receiveCreditMoney(long double number){if(_creditLimit==0){_money+=number;_creditLimit=number+number*0.2;MessageOperation("Operation completed\n");}else{MessageOperation("You have credit\n");}}
- void returnCreditMoney(){if(_money<_creditLimit){_creditLimit-=_money;_money=0;MessageOperation("Operation completed");}else{_money-=_creditLimit;_creditLimit=0;MessageOperation("Operation completed");}}
- };
- private:
- std::string _FNLN;
- std::string _passwordToFinanceSystem;
- int _countWallets;
- int _countDebitCards;
- int _countCreditCards;
- WalletZozInc* wallet;
- DebitCardZozInc* debitCard;
- CreditCardZozInc* creditCard;
- public:
- //Constructs
- FinanceSystemZozInc(std::string FNLN,std::string passwordToFinanceSystem)
- :_FNLN{FNLN},_passwordToFinanceSystem{passwordToFinanceSystem}, _countWallets{0}, _countDebitCards{0}, _countCreditCards{0}{}
- FinanceSystemZozInc(char* FNLN,char* passwordToFinanceSystem)
- :_FNLN{FNLN},_passwordToFinanceSystem{passwordToFinanceSystem}, _countWallets{0}, _countDebitCards{0}, _countCreditCards{0}{}
- FinanceSystemZozInc(char* FNLN,std::string passwordToFinanceSystem)
- :_FNLN{FNLN},_passwordToFinanceSystem{passwordToFinanceSystem}, _countWallets{0}, _countDebitCards{0}, _countCreditCards{0}{}
- FinanceSystemZozInc(std::string FNLN,char* passwordToFinanceSystem)
- :_FNLN{FNLN},_passwordToFinanceSystem{passwordToFinanceSystem}, _countWallets{0}, _countDebitCards{0}, _countCreditCards{0}{}
- //Destruct
- /*~FinanceSystemZozInc(){delete[] wallet;delete[] debitCard; delete[] creditCard;_countWallets=0;_countDebitCards=0;_countCreditCards=0;}*/
- //Methods_Create Cards/Wallets
- void createWallet(std::string FNLN){
- WalletZozInc* test=new WalletZozInc[_countWallets];
- for(int index{0};index<_countWallets;++index){test[index]=wallet[index];}
- ++_countWallets;
- wallet=new WalletZozInc[_countWallets];
- for(int index{0};index<_countWallets-1;++index){wallet[index]=test[index];}
- wallet[_countWallets-1].changeNameOfOwnerOfWallet(FNLN, "AdminKey");
- };
- void createWallet(char* FNLN){
- WalletZozInc* test=new WalletZozInc[_countWallets];
- for(int index{0};index<_countWallets;++index){test[index]=wallet[index];}
- ++_countWallets;
- wallet=new WalletZozInc[_countWallets];
- for(int index{0};index<_countWallets-1;++index){wallet[index]=test[index];}
- wallet[_countWallets-1].changeNameOfOwnerOfWallet(FNLN, "AdminKey");};
- void createDebitCard(std::string FNLN){DebitCardZozInc* test=new DebitCardZozInc[_countDebitCards];
- for(int index{0};index<_countDebitCards;++index){test[index]=debitCard[index];}
- ++_countDebitCards;
- debitCard=new DebitCardZozInc[_countDebitCards];
- for(int index{0};index<_countDebitCards-1;++index){debitCard[index]=test[index];}
- debitCard[_countDebitCards-1].changeNameOfOwnerOfDebitCard(FNLN, "AdminKey");};
- void createDebitCard(char* FNLN){DebitCardZozInc* test=new DebitCardZozInc[_countDebitCards];
- for(int index{0};index<_countDebitCards;++index){test[index]=debitCard[index];}
- ++_countDebitCards;
- debitCard=new DebitCardZozInc[_countDebitCards];
- for(int index{0};index<_countDebitCards-1;++index){debitCard[index]=test[index];}
- debitCard[_countDebitCards-1].changeNameOfOwnerOfDebitCard(FNLN, "AdminKey");};
- void createCreditCard(std::string FNLN){
- bool check=false;
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getCreditLimit()!=0){check=true;}}
- if(check==false){
- CreditCardZozInc* test=new CreditCardZozInc[_countCreditCards];
- for(int index{0};index<_countCreditCards;++index){test[index]=creditCard[index];}
- ++_countCreditCards;
- creditCard=new CreditCardZozInc[_countCreditCards];
- for(int index{0};index<_countCreditCards-1;++index){creditCard[index]=test[index];}
- creditCard[_countCreditCards-1].changeNameOfOwnerOfCreditCard(FNLN, "AdminKey");}};
- void createCreditCard(char* FNLN){
- bool check=false;
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getCreditLimit()!=0){check=true;}}
- if(check==false){
- CreditCardZozInc* test=new CreditCardZozInc[_countCreditCards];
- for(int index{0};index<_countCreditCards;++index){test[index]=creditCard[index];}
- ++_countCreditCards;
- creditCard=new CreditCardZozInc[_countCreditCards];
- for(int index{0};index<_countCreditCards-1;++index){creditCard[index]=test[index];}
- creditCard[_countCreditCards-1].changeNameOfOwnerOfCreditCard(FNLN, "AdminKey");}};
- //Operation with money
- void putMoneyWallet(int idWallet,long double money){
- for(int index{0};index<_countWallets;++index){if(wallet[index].getId()==idWallet){wallet[index].addMoney(money);break;}}
- }
- void minucMoneyWallet(int idWallet,long double money){
- for(int index{0};index<_countWallets;++index){if(wallet[index].getId()==idWallet){wallet[index].minucMoney(money);break;}}}
- void putMoneyDebitCard(int idDebitCard,long double money){
- for(int index{0};index<_countDebitCards;++index){if(debitCard[index].getId()==idDebitCard){debitCard[index].addMoney(money);break;}}}
- void minucMoneyDebitCard(int idDebitCard,long double money){
- for(int index{0};index<_countDebitCards;++index){if(debitCard[index].getId()==idDebitCard){debitCard[index].minucMoney(money);break;}}
- }
- void putMoneyCreditCard(int idCreditCard,long double money){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].addMoney(money);break;}}
- }
- void minucMoneyCreditCard(int idCreditCard,long double money){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].minucMoney(money);break;}}
- }
- void getCredit(int idCreditCard,long double money){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].receiveCreditMoney(money);break;}}
- }
- //Names
- void changeNameOfWallet(int idWallet,std::string name){
- for(int index{0};index<_countWallets;++index){if(wallet[index].getId()==idWallet){wallet[index].changeNameOfWallet(name);break;}}
- }
- void changeNameOfWallet(int idWallet,char* name){
- for(int index{0};index<_countWallets;++index){if(wallet[index].getId()==idWallet){wallet[index].changeNameOfWallet(name);break;}}
- }
- void changeNameOfDebitCard(int idDebitCard,std::string name){
- for(int index{0};index<_countDebitCards;++index){if(debitCard[index].getId()==idDebitCard){debitCard[index].changeNameOfDebitCard(name);break;}}
- }
- void changeNameOfDebitCard(int idDebitCard,char* name){
- for(int index{0};index<_countDebitCards;++index){if(debitCard[index].getId()==idDebitCard){debitCard[index].changeNameOfDebitCard(name);break;}}
- }
- void changeNameOfCreditCard(int idCreditCard,std::string name){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].changeNameOfCreditCard(name);break;}}
- }
- void changeNameOfCreditCard(int idCreditCard,char* name){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].changeNameOfCreditCard(name);break;}}
- }
- //Stats
- void showStatWallet(int idWallet){
- for(int index{0};index<_countWallets;++index){if(wallet[index].getId()==idWallet){wallet[index].showMyWallet();break;}}}
- void showStatDebitCard(int idDebitCard){
- for(int index{0};index<_countDebitCards;++index){if(debitCard[index].getId()==idDebitCard){debitCard[index].showMyDebitCard();break;}}
- }
- void showStatCreditCard(int idCreditCard){
- for(int index{0};index<_countCreditCards;++index){if(creditCard[index].getId()==idCreditCard){creditCard[index].showMyCreditCard();break;}}
- }
- //Methods finance system
- std::string getFNLN(){return _FNLN;}
- //Files
- void makeCopy()
- {
- std::ofstream file;
- file.open("reserve.txt");
- file<<getFNLN()<<"\n";
- file<<_passwordToFinanceSystem<<"\n";
- file<<idsWallets<<"\n";
- file<<idsDebitCards<<"\n";
- file<<idsCreditCards<<"\n";
- file<<_countWallets<<"\n";
- file<<_countDebitCards<<"\n";
- file<<_countCreditCards<<"\n";
- for(int index{0};index<_countWallets;++index)
- {
- file<<wallet[index].getId()<<"\n";
- file<<wallet[index].getNameOfOwnerOfWallet()<<"\n";
- file<<wallet[index].getNameOfWallet()<<"\n";
- file<<wallet[index].getMoney()<<"\n";
- }
- for(int index{0};index<_countDebitCards;++index)
- {
- file<<debitCard[index].getId()<<"\n";
- file<<debitCard[index].getNameOfOwnerOfDebitCard()<<"\n";
- file<<debitCard[index].getNameOfDebitCard()<<"\n";
- file<<debitCard[index].getMoney()<<"\n";
- }
- for(int index{0};index<_countCreditCards;++index)
- {
- file<<creditCard[index].getId()<<"\n";
- file<<creditCard[index].getNameOfOwnerOfCreditCard()<<"\n";
- file<<creditCard[index].getNameOfCreditCard()<<"\n";
- file<<creditCard[index].getMoney()<<"\n";
- file<<creditCard[index].getCreditLimit()<<"\n";
- }
- file.close();
- }
- void returnFile(std::ifstream& file)
- {
- std::string line;
- std::getline(file,line);
- _FNLN=line;
- std::getline(file,line);
- _passwordToFinanceSystem=line;
- std::getline(file,line);
- idsWallets=stoi(line);
- std::getline(file,line);
- idsDebitCards=stoi(line);
- std::getline(file,line);
- idsCreditCards=stoi(line);
- std::getline(file,line);
- _countWallets=stoi(line);
- std::getline(file,line);
- _countDebitCards=stoi(line);
- std::getline(file,line);
- _countCreditCards=stoi(line);
- for(int index{0};index<_countWallets;++index)
- {
- std::getline(file,line);
- wallet[index].changeId(stoi(line), "AdminKey");
- std::getline(file,line);
- wallet[index].changeNameOfOwnerOfWallet(line, "AdminKey");
- std::getline(file,line);
- wallet[index].changeNameOfWallet(line);
- std::getline(file,line);
- wallet[index].changeMoney(stoi(line), "AdminKey");
- }
- for(int index{0};index<_countDebitCards;++index)
- {
- std::getline(file,line);
- debitCard[index].changeId(stoi(line), "AdminKey");
- std::getline(file,line);
- debitCard[index].changeNameOfOwnerOfDebitCard(line, "AdminKey");
- std::getline(file,line);
- debitCard[index].changeNameOfDebitCard(line);
- std::getline(file,line);
- debitCard[index].changeMoney(stoi(line), "AdminKey");
- }
- for(int index{0};index<_countCreditCards;++index)
- {
- std::getline(file,line);
- creditCard[index].changeId(stoi(line), "AdminKey");
- std::getline(file,line);
- creditCard[index].changeNameOfOwnerOfCreditCard(line, "AdminKey");
- std::getline(file,line);
- creditCard[index].changeNameOfCreditCard(line);
- std::getline(file,line);
- creditCard[index].changeMoney(stoi(line), "AdminKey");
- std::getline(file,line);
- creditCard[index].changeCreditLimit(stoi(line), "AdminKey");
- }
- }
- };
- int menuFinance()
- {
- int num;
- std::cout<<"\t\tSelect\n";
- std::cout<<"1) Wallet\n";
- std::cout<<"2) Debit Card\n";
- std::cout<<"3) Credit Card\n";
- std::cin>>num;
- return num;
- }
- int menuOperation()
- {
- int num;
- std::cout<<"\t\tOperation Menu\n";
- std::cout<<"1) Put money\n";
- std::cout<<"2) Get money\n";
- std::cout<<"3) Get credit\n";
- std::cout<<"4) ShowStat\n";
- std::cin>>num;
- return num;
- }
- int menuMain()
- {
- int num;
- std::cout<<"\t\tMain menu\n";
- std::cout<<"1) Create wallet\n";
- std::cout<<"2) Create debit card\n";
- std::cout<<"3) Create credit card\n";
- std::cout<<"4) Operation with money\n";
- std::cout<<"5) Make reserve copy\n";
- std::cout<<"6) Exit\n";
- std::cin>>num;
- return num;
- }
- int main()
- {
- int choice;
- std::cout<<"Want to download copy from file reserve.txt? 1 - Yes\nChoice = ";
- std::cin>>choice;
- FinanceSystemZozInc financeSystem("Andrey Zozulych","1234");
- if(choice==1){
- std::ifstream file("reserve.txt");
- financeSystem.returnFile(file);
- file.close();
- }
- while(true)
- {
- int select = menuMain();
- if(select==1){ financeSystem.createWallet(financeSystem.getFNLN()); }
- else if(select==2){financeSystem.createDebitCard(financeSystem.getFNLN());}
- else if(select==3){financeSystem.createCreditCard(financeSystem.getFNLN());}
- else if(select==4){
- int selectSecond = menuOperation();
- if(selectSecond==1){
- int selectSystem=menuFinance();
- if(selectSystem==1)
- {
- int id,money;
- std::cout<<"ID Wallet = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.putMoneyWallet(id, money);
- }
- else if(selectSystem==2)
- {
- int id,money;
- std::cout<<"ID Debit Card = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.putMoneyDebitCard(id, money);
- }
- else if(selectSystem==3)
- {
- int id,money;
- std::cout<<"ID Credit Card = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.putMoneyCreditCard(id, money);
- }
- }
- else if(selectSecond==2){
- int selectSystem=menuFinance();
- if(selectSystem==1)
- {
- int id,money;
- std::cout<<"ID Wallet = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.minucMoneyWallet(id, money);
- }
- else if(selectSystem==2)
- {
- int id,money;
- std::cout<<"ID Debit Card = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.minucMoneyDebitCard(id, money);
- }
- else if(selectSystem==3)
- {
- int id,money;
- std::cout<<"ID Credit Card = ";
- std::cin>>id;
- std::cout<<"Money = ";
- std::cin>>money;
- financeSystem.minucMoneyCreditCard(id, money);
- }
- }
- else if(selectSecond==3){
- int id,creditLimit;
- std::cout<<"ID Credit Card = ";
- std::cin>>id;
- std::cout<<"Credit = ";
- std::cin>>creditLimit;
- financeSystem.getCredit(id, creditLimit);
- }
- else if(selectSecond==4){
- int selectSystem=menuFinance();
- if(selectSystem==1)
- {
- int id;
- std::cout<<"ID Wallet = ";
- std::cin>>id;
- financeSystem.showStatWallet(id);
- }
- else if(selectSystem==2)
- {
- int id;
- std::cout<<"ID Debit Card = ";
- std::cin>>id;
- financeSystem.showStatDebitCard(id);
- }
- else if(selectSystem==3)
- {
- int id;
- std::cout<<"ID Credit Card = ";
- std::cin>>id;
- financeSystem.showStatCreditCard(id);
- }
- }
- }
- else if(select==5){financeSystem.makeCopy();}
- else if(select==6){break;}
- }
- }
- int FinanceSystemZozInc::idsWallets=0;
- int FinanceSystemZozInc::idsDebitCards=0;
- int FinanceSystemZozInc::idsCreditCards=0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement