Exemple #1
0
int main ()
{
    BankAccount one{"Fist one", "Three hundre", 300};
    BankAccount two = BankAccount("Second two", "zero");
    BankAccount three = BankAccount();
    one.show();
    one.deposit(500);
    two.show();

    three = BankAccount("one million", "one million", 100000);
    three.show();
    three.withdraw(7852);
    three.show();
    one.show();
    return 0;
}
Exemple #2
0
int main()
{
	using namespace Bank_Account;
	BankAccount Gavrila = BankAccount("Ivan Ivanov", "12345678q", 10000);
	std::cout << "Hello, let me tell you about myself" << std::endl;
	Gavrila.show();
	std::cin.get();
	std::cout << "One day I suddenly understood that someone accidently give me some cash. Look" << std::endl;
	std::cin.get();
	Gavrila.add_money(500);
	Gavrila.show();
	std::cin.get();
	std::cout << "I was so happy, that I started to buy expensive things" << std::endl;
	std::cin.get();
	std::cout << "Like this cat =^.^=" << std::endl;
	std::cin.get();
	Gavrila.retrieve_money(300);
	std::cin.get();
	std::cout << "Like these flowers @>--;-- @>--;-- @>--;-- @>--;--" << std::endl;
	std::cin.get();
	Gavrila.retrieve_money(500);
	std::cin.get();
	std::cout << "Like this bear (''')-.-(''')" << std::endl;
	std::cin.get();
	Gavrila.retrieve_money(8000);
	std::cin.get();
	std::cout << "And these pretty cats >^..^<   >'o'<   >^..^<" << std::endl;
	std::cin.get();
	Gavrila.retrieve_money(3000);
	std::cin.get();
	std::cout << "And finally I got broken" << std::endl;
	std::cin.get();
	Gavrila.show();
	std::cin.get();
	std::cout << "Sad story =(" << std::endl;
	return 0;
}