コード例 #1
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;
        }
コード例 #2
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
コード例 #3
0
 public BalanceInquiry(int currentAccountNumber, Screen screen, BankDatabase bankDatabase)
 {
     this.currentAccountNumber = currentAccountNumber;
     this.screen       = screen;
     this.bankDatabase = bankDatabase;
 }