public void Find (String id, int acctType, Teller teller) { for (int i = 0; i < accounts.Length; i++) { Account acct = accounts[i]; if (acct.GetId() == id) { switch (acctType) { case SAVINGS: if (acct is Savings) { teller.AcceptAccount(acct); return; } break; case CHECKING: if (acct is Checking) { teller.AcceptAccount(acct); return; } break; } } } teller.AcceptAccount(null); }
public void Clear() { // Note 6 start.Enabled = true; savings.Enabled = false; checking.Enabled = false; transaction.Enabled = false; enter.Text = "Enter Name"; enter.Enabled = false; dataEntry.Text = ""; dataEntry.Enabled = false; message = "Welcome to Art's bank"; Invalidate(); teller = new Teller(bank, this); }