Class Withdrawal (Fig. J.10) extends Transaction and represents an ATM withdrawal transaction. This class expands upon the “skeleton” code for this class developed in Fig. 11.22. Recall from the class diagram of Fig. 11.19 that class Withdrawal has one attribute, amount, which line 6 implements as a Decimal instance variable. Fig. 11.19 models associations between class Withdrawal and classes Keypad and CashDispenser, for which lines 7–8 implement reference attributes keypadHandle and dispenserHandle, respectively. Line 11 declares a constant corresponding to the cancel menu option. We will soon discuss how the class uses this constant.
1 ' Withdrawal.vb ...