Ejemplo n.º 1
0
int main() {

	Bank wooriBank;

	wooriBank.init();
	wooriBank.CreateAccount("Paul", 3000);
	wooriBank.CreateAccount("Mc");

	wooriBank.SetDeposit(0, 2000);
	wooriBank.SetDeposit(1, 1000);

	wooriBank.ShowAllAccounts();
	
	return 0;
}
Ejemplo n.º 2
0
int main(int argc, const char * argv[]) {
    
    Bank* shinhan = new Bank();
    
    shinhan->CreateAccount("asdf", 1235, 1000);

//    이미 존재하는 계좌번호를 입력하게 되면 생성되지 않는다.
    shinhan->CreateAccount("asf", 1235, 1000);
    shinhan->CreateAccount("qwer", 1231, 1000);
    
    shinhan->SetDeposite(1231, 1010);
    shinhan->SetDeposite(1235, 2020);
    
    shinhan->ShowAllAccount();

    delete shinhan;
//  은행을 delete하게 되면, 은행이 보유하고 있던 계좌들도 delete 됨.
    
    return 0;
}