Exemplo n.º 1
0
 public ATM()
 {
     userAuthenticated    = false;
     currentAccountNumber = 0;
     screen        = new Screen();
     keypad        = new Keypad();
     cashDispenser = new CashDispenser();
     depositSlot   = new DepositSlot();
     bankDatabase  = new BankDatabase();
 }
Exemplo n.º 2
0
        public override void Execute()
        {
            BankDatabase bankDatabase = Database;
            Screen       screen       = UserScreen;

            decimal avaibleBalance = bankDatabase.getAvaibleBalance(AccountNumber);
            decimal totalBalance   = bankDatabase.getTotalBalance(AccountNumber);

            // hesaptaki bilgileri ekrana yazar
            screen.DisplayMessage("\nAvaible Balance: ");
            screen.DisplayDollarAmount(avaibleBalance);
            screen.DisplayMessage("\nTotal Balance: ");
            screen.DisplayDollarAmount(totalBalance);
        }
Exemplo n.º 3
0
        // islem yap
        public override void Execute()
        {
            BankDatabase bankDatabase = Database;
            Screen       screen       = UserScreen;

            bool isContinue = true;

            while (isContinue)
            {
                bool display = DisplayMenu();
                if (display == true)
                {
                    UserScreen.DisplayMessageLine("\nOperation success!");
                    isContinue = DoYouWantToContinue();
                }
                else if (display == false)
                {
                    isContinue = false;
                }
            }
        }
Exemplo n.º 4
0
 public BalanceInquiry(int userAccountNumber, Screen atmScreen, BankDatabase atmBankDatabase)
     : base(userAccountNumber, atmScreen, atmBankDatabase)
 {
 }
Exemplo n.º 5
0
 public Deposit(int userAccountNumber, Screen atmScreen, BankDatabase atmBankDatabase, Keypad atmKeypad, DepositSlot atmDepositSlot)
     : base(userAccountNumber, atmScreen, atmBankDatabase)
 {
     keypad      = atmKeypad;
     depositSlot = atmDepositSlot;
 }
Exemplo n.º 6
0
 public Withdrawal(int userAccountNumber, Screen atmScreen, BankDatabase atmBankDatabase, Keypad atmKeypad, CashDispenser atmCashDispenser)
     : base(userAccountNumber, atmScreen, atmBankDatabase)
 {
     keypad        = atmKeypad;
     cashDispenser = atmCashDispenser;
 }