Exemplo n.º 1
0
        } // end enum MenuOption

        // parameterless constructor initializes instance variables
        public ATM()
        {
            userAuthenticated    = false;        // user is not authenticated to start
            currentAccountNumber = 0;            // no current account number to start
            screen        = new Screen();        // create screen
            keypad        = new Keypad();        // create keypad
            cashDispenser = new CashDispenser(); // create cash dispenser
            depositSlot   = new DepositSlot();   // create deposit slot
            bankDatabase  = new BankDatabase();  // create account info database
        } // end constructor
Exemplo n.º 2
0
        } // end constructor

        public Withdrawal(int currentAccountNumber, Screen screen, BankDatabase bankDatabase, Keypad keypad, CashDispenser cashDispenser) : this(currentAccountNumber)
        {
            this.screen        = screen;
            this.bankDatabase  = bankDatabase;
            this.keypad        = keypad;
            this.cashDispenser = cashDispenser;
        }