Exemplo n.º 1
0
 public static void Category(StoreAccount account, AccountCategoryId category)
 {
     if (account.ChangeCategory(category))
     {
         Console.WriteLine($"Eligible for category change to {category}");
     }
     else
     {
         Console.WriteLine($"Not eligible for category change to {category}");
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var dimitris = new Account("Dimitris");

            var trump = new StoreAccount("Kostas");

            SuccesfulWithdrawal(trump.Withdraw(100), trump);
            SuccessfulDeposit(trump.Deposit(500), trump);
            SuccessfulDeposit(trump.Deposit(500), trump);
            SuccessfulDeposit(trump.Deposit(5001), trump);
            SuccessfulDeposit(trump.Deposit(4500), trump);

            SuccesfulWithdrawal(dimitris.Withdraw(200), dimitris);
            SuccessfulDeposit(dimitris.Deposit(500), dimitris);
            SuccessfulDeposit(dimitris.Deposit(200), dimitris);
            SuccesfulWithdrawal(dimitris.Withdraw(150), dimitris);

            Category(trump, AccountCategoryId.Basic);
            Category(trump, AccountCategoryId.Lead);
            Category(trump, AccountCategoryId.Senior);


            Console.ReadLine();
        }